#---原因:mysql 导入工具的bug
#---解决:使用双引号不个音标括起来.
作者 老哇的爪子 Attilax 艾龙, EMAIL:[email protected]
转载请注明来源: http://blog.csdn.net/attilax
from log import *
iniLog (r"c:\enWzPhonetic.log")
n=0
for line in lines:
if(n>100000 ):break;
if( not isContain(line, "[")):continue;
word= left_ByFirstChar(line, r"[")
word=trim(word)
logging.info(" start to word:"+word)
phonetic=subStrNtrim(line, r"[", r"]")
phonetic=replace_multiple(phonetic,splitor, spltrFinal )
phonetic=trim_multi(phonetic, "@ ")
logging.info(word+"---\""+phonetic+"\"")
#todox import mysql5.6 empty, in phntc ,so .must include use doubleQuot
line=word+"\t\""+phonetic+"\""
fileHandle.write(line+"\n")
n=n+1
#endfor
print ("啊?b?‘rei??n")
fileHandle.close()
paip.导入数据英文音标到数据库mysql为空的问题之道解决原理,码迷,mamicode.com
时间: 2024-10-29 19:12:07