paip.导入数据英文音标到数据库mysql为空的问题之道解决原理 #---原因:mysql 导入工具的bug #---解决:使用双引号不个音标括起来. 作者 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com 转载请注明来源: http://blog.csdn.net/attilax from log import *
paip.导入数据英文音标到数据库mysql为空的问题之道解决原理
#---原因:mysql 导入工具的bug
#---解决:使用双引号不个音标括起来.
作者 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: 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()
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn