There are a lot of data in a database table, one of the string is "Stra? E ", including a German letters? , I use the SQL data acquisition to the rs, with TMP=rs. Get string (,,, "",, vbCrLf) to get a long string, use the Open "C: \ test CSV" For the Output As the # 1 Print # 1, TMP Written to a CSV file, other data is normal, but the German letters according to the code? Should I how to solve this problem, please? (I trace, the rs data is normal, but to the TMP is garbled, also show the code in written to the CSV)
CodePudding user response:
When you look at the CSV file, with a corresponding word stock, don't in TMP, unless your system environment is in German word stock,
System is transmitted between code, only to see, just take out the pictures from the character displayed on the screen or printed to paper,
CodePudding user response:
When you look at the garbled characters of DF coding?
The Debug. Print Hex (Asc (Mid (TMP, 5, 1)))
Seems should use the text character set Latin1_General_BIN (ISO - 8859) :
0 1 2 3 4 5 6 7 8 9 A B C D E F 0 x 1 x 2 x SP! "# $% & amp; '() *, +, -,/ 3 x 0 1 2 3 4 5 6 7 8 9:; <=& gt; ? 4 x @ A B C D E F G H I J K L M N O 5 X P Q R S T U V W X Y Z [\] ^ _ 6 x ` a b c d e f g h I j k l m n o 7 x p q r s t u v w x y z {|} ~ 8 x 9 x Ax NBSP? ¢on problem RMB | § ¨? A? ? SHY? ˉ Bx ° plus or minus 2, 3, 'mu? Who? 1 o? ? ? ? ? Cx aa? ? ? ? ? ? E e e? I I? ? Dx D? O o? ? ? X? U u? U T Y? The Ex a aa? ? ? ? ? E e e? I I? ? Fx e? O o? ? ? Present? U u? U t y?
Your problem is the opposite of this post: database field is the code in Chinese, how to turn?