Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PythonÖеÄUnicodeÔÚDelphiÈçºÎ»¹Ô­³ÉGb2312£¿

ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ

ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô­³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨

function UniCode2GB(S : String):String;
Var
  I: Integer;
begin
I := Length(S);
  while I >=4 do
  begin
    try
      Result :=WideChar(StrToInt('$'+S[I-3]+S[I-2]+S[I-1]+S[I]))+ Result;
    except end;
    I := I - 4;
  end;
end;


Ïà¹ØÎÊ´ð£º

ÓÐûÓÐÈËÑо¿¹ýDelphi for PHP

ÈçÌâ¡£
¸Ð¾õÈçºÎ£¿½»Á÷Ï¡£

ûÓÐÑо¿¹ý£¬ºÇºÇ

ÓÐɶÑо¿Í·£¿

ÄǸö¶«Î÷£¬ÊǸö¼¦Àߣ¬£¬Ã»ÓÐʲôÒâ˼£¬·¢ÏÖ£¡£¡

ÓÃÀ´×öB/S¼Ü¹¹µÄMISϵͳµÄ»°Ó¦¸Ã¿ÉÒÔÌá¸ß½çÃ濪·¢µÄЧÂÊ°É£¿


ÒòΪ²»ÊìϤDelphi £ ......

ÇëÎÊpythonºÍpyodcÓÐʲôÇø±ð

Âé·³¸ßÊÖ½â´ðһϠллÁË ÎÒÊÇÐÂÊÖ Ò»Ð©¸ÅÄ²»Ì«Çå³þ¡£¡£¡£
pyodbc is a Python module that allows you to use ODBC to connect to almost any database from Windows, Linux, OS/X, and more.

pyodbcÊÇ ......

µÚÒ»´ÎÓÃPythonд³ÌÐò£¬Ê¹ÓÃfindº¯ÊýÓöµ½Ò»¸öÎÊÌâ

//ÏÂÃæµÄ´úÂëÔËÐÐÕý³£

tomstrs=re.findall(......)
mtxx=''
for tomstr in tomstrs:
  tomstr=tomstr.strip()
  if  tomstr:
      mtxx += tomstr ......

ÇëÎÊpythonÀïÃæµÄ@ʲôÒâ˼£¿

±ÈÈç

Python code:
@orm.validates('title')
def validate_title(self, key, title):
"""Assure that page titles are wikiwords and valid length"""
......

ÐÂÐͶñÒâ³ÌÐòpythonÔì——µÁÇÔÊÖ»úÕË»§

http://www.cioage.com/art/200906/78173.htm
¾ÝϤ£¬¿¨°Í˹»ùʵÑéÊÒÉÏÖܼì²âµ½Ò»ÖÖ¹¥»÷Èû°àϵͳµÄжñÒâ³ÌÐò£¬¸Ã³ÌÐòµÄ¹¥»÷Ä¿±êÊÇÒ»¼ÒÓ¡¶ÈÄáÎ÷ÑÇÒƶ¯µç»°ÔËÓªÉ̵ÄÓû§¡£¸ÃľÂíÓÉÒ»ÖֽРPythonµÄ½Å±¾ÓïÑÔ±àд£¬Ëü» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ