我有一个C函数,它期望list\0终止的字符串作为输入:
void external_C( int length , const char ** string_list) {
// Inspect the content of string_list - but not modify it.
}
Run Code Online (Sandbox Code Playgroud)
从python(使用ctypes)我想基于python字符串列表调用此函数:
def call_c( string_list ):
lib.external_C( ?? )
call_c( ["String1" , "String2" , "The last string"])
Run Code Online (Sandbox Code Playgroud)
有关如何在python端构建数据结构的任何提示?注意我保证C函数不会改变string_list中字符串的内容.
问候
乔金 -
我正在设计一个新的CMS,但想设计它以满足我未来的所有需求,如多语言内容,所以我认为Unicode(UTF-8)是最好的解决方案
但通过一些搜索,我得到了这篇文章
http://msdn.microsoft.com/en-us/library/bb330962%28SQL.90%29.aspx#intlftrql2005_topic2
所以我现在很困惑现在使用UTF-8/UTF-16/UTF-32/UCS-2
这对于多语言内容和性能等更好.
PS:我使用的是Asp.net和c#以及SqlServer 2005
提前致谢