kopola Posted December 29, 2007 Share Posted December 29, 2007 hello when i try to copy a word to a .txt file, all "é" are transformed to a "," . How can i change it ? ty in advance Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 29, 2007 Share Posted December 29, 2007 (edited) hello when i try to copy a word to a .txt file, all "é" are transformed to a "," . How can i change it ? ty in advance How did you write it? Specifically, did you FileOpen() with a Unicode format, or just use the default ANSI? ANSI seems to write/read that character for me just fine: $sData = "This is my funky é" $sFile = "C:\Temp\Test.txt" $hFile = FileOpen($sFile, 2) ; default ANSI overwrite FileWrite($hFile, $sData) FileClose($hFile) Run("notepad.exe " & $sFile) Can you post a short script as above that duplicates your issue? Edited December 29, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kopola Posted December 29, 2007 Author Share Posted December 29, 2007 default ansi, like filewrite . Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 29, 2007 Share Posted December 29, 2007 default ansi, like filewrite .Yeah, my first impulse was wrong (as often happens). Try the code in the edit above, and please post a reproducer script so we can see your symptom. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kopola Posted December 29, 2007 Author Share Posted December 29, 2007 (edited) $folder= @AppDataDir & "\game\" $wildcards="*readme.txt*" Runwait(@comspec &' /c dir "'& $FOLDER & '\' & $WILDCARDS &'" /b/s >'& @WindowsDir &'\list.txt',"",@SW_HIDE) $lines=StringSplit(Stringreplace(fileread(@WindowsDir & "\list.txt",FileGetSize (@WindowsDir &"\list.txt")),@lf,""),@CR) i need to write in a txt file were is a file in appdatadir, but in my language appdatadir is "propriétaire" and in the txt file we can see "propri,taire"... Edited December 29, 2007 by kopola Link to comment Share on other sites More sharing options...
kopola Posted December 29, 2007 Author Share Posted December 29, 2007 any help? Link to comment Share on other sites More sharing options...
kopola Posted December 29, 2007 Author Share Posted December 29, 2007 plz help Link to comment Share on other sites More sharing options...
kopola Posted December 29, 2007 Author Share Posted December 29, 2007 plz can i have help?? Link to comment Share on other sites More sharing options...
Swift Posted December 29, 2007 Share Posted December 29, 2007 1 post is suffient...but we dont really suppost foriegn languages not sure autoit will work with this purpose. sorry. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 29, 2007 Share Posted December 29, 2007 $folder= @AppDataDir & "\game\" $wildcards="*readme.txt*" Runwait(@comspec &' /c dir "'& $FOLDER & '\' & $WILDCARDS &'" /b/s >'& @WindowsDir &'\list.txt',"",@SW_HIDE) $lines=StringSplit(Stringreplace(fileread(@WindowsDir & "\list.txt",FileGetSize (@WindowsDir &"\list.txt")),@lf,""),@CR) i need to write in a txt file were is a file in appdatadir, but in my language appdatadir is "propriétaire" and in the txt file we can see "propri,taire"... I'm not set to that language, but this reproduces the symptoms for me (I created the folder "C:\Temp\propriétaire" and put some .txt files in it): $folder= "C:\Temp\propriétaire" $wildcards="*.txt" Runwait(@comspec & ' /c dir "' & $folder & '\' & $WILDCARDS &'" /b/s >' & $folder & '\list.dat',"",@SW_HIDE)oÝ÷ Ù8^ë.ا+-u«b±Êx.|ÓÝzjt÷jk¢âµ¨«{OvMé©ÖÜm4÷dÞ=Ú覸j*ÞÓÝzjv·BçÍ=Ù7¦§Ov¦º)®+Z·´÷dÞíÆßܡ׶§Øb²+ªíö¶íà¨Ê%yéïº'éí@ºÚµ.².×h¶¬Â+a«b½à.¶-r¦jwlNWËS ëk'îËb¢z'*Þ¶êç²Ø^~)^ýú%uêçjg¬~§vz-¶ºYijØR¡Ú"¶¬Á¬ºÚ"µÍÚ[ÛYH Ù[K]LÉÝÂÌÍÙÛH ][ÝÐÎÌLÕ[ ][ÝÂÌÍÝÚ[ØÏI][ÝÊ][ÝÂÌÍØ]ÝHÑ[SÝÐ^J ÌÍÙÛ ÌÍÝÚ[ØÊBÑ[UÜ]QÛP^J ÌÍÙÛ [È ][ÝÉÌLÛÝ ][ÝË ÌÍØ]ÝJ Results in this for list.txt: PrinterInfo.txt propriétaire temp Temp1 Temp1.txt Temp2 Temp2.txt Temp3.txt Test-1.rtf Test.ini Test.txt Test.txt.BAK Test.zip But that should be easy to code around if you need the full path included. P.S. Bumping a thread that often is considered rude and could provoke a response from the moderators. P.P.S. @Swift: This forum DOES support language issues, though most people here speak and write in English there are many who are native/fluent in other languages also. Jon has a standing invitation out to anyone who wants to contribute to translations of the help file, for example. In some languages there are alternate support sites like autoitscript.de or autoitscript.free.fr. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Swift Posted December 29, 2007 Share Posted December 29, 2007 Sowwie Link to comment Share on other sites More sharing options...
kopola Posted December 29, 2007 Author Share Posted December 29, 2007 (edited) but how can i have the full path ? and how to have only the file i want Edited December 29, 2007 by kopola Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 29, 2007 Share Posted December 29, 2007 but how can i have the full path ? and how to have only the file i want Well, that was wussy... you didn't even try: #include <file.au3> $folder = @AppDataDir & "\game\" $wildcards = "*readme.txt*" $avFiles = _FileListToArray($folder, $wildcards) If @error Then MsgBox(16, "Error", "No matching files found.") Else For $n = 1 To $avFiles[0] $avFiles[$n] = $folder & $avFiles[$n] Next _FileWriteFromArray(@WindowsDir & '\list.txt', $avFiles, 1) EndIf Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
randallc Posted December 30, 2007 Share Posted December 30, 2007 $folder= @AppDataDir & "\game\" $wildcards="*readme.txt*" Runwait(@comspec &' /c dir "'& $FOLDER & '\' & $WILDCARDS &'" /b/s >'& @WindowsDir &'\list.txt',"",@SW_HIDE) $lines=StringSplit(Stringreplace(fileread(@WindowsDir & "\list.txt",FileGetSize (@WindowsDir &"\list.txt")),@lf,""),@CR) i need to write in a txt file were is a file in appdatadir, but in my language appdatadir is "propriétaire" and in the txt file we can see "propri,taire"...Hi, Look at the wilcard, subdirectory optios, and Display in the zip in this thread; _FileWritFromArray will work. It is the ">" in the DOS command that loses the ANSI over 128 btw. Fast New ArrayDisplay with Fast Sort,Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
kopola Posted December 30, 2007 Author Share Posted December 30, 2007 (edited) i got an error (21) : ==> Subscript used with non-Array variable.: For $n = 1 To $avFiles[0] For $n = 1 To $avFiles^ ERROR Edited December 30, 2007 by kopola Link to comment Share on other sites More sharing options...
kopola Posted December 30, 2007 Author Share Posted December 30, 2007 what is wrong with that? Link to comment Share on other sites More sharing options...
kopola Posted December 30, 2007 Author Share Posted December 30, 2007 please help me Link to comment Share on other sites More sharing options...
kopola Posted December 30, 2007 Author Share Posted December 30, 2007 ok that work but that no include subdirectories and there is no "\" at the end. exemple : C:\Documents and Settings\Propriétaire\Application Data\game\mygamereadme.txt Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 30, 2007 Share Posted December 30, 2007 ok that work but that no include subdirectories and there is no "\" at the end.exemple :C:\Documents and Settings\Propriétaire\Application Data\game\mygamereadme.txtSearch the Forum for any one of many recursive search examples. Take my word for it, Scully... the Truth is out there... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
randallc Posted December 30, 2007 Share Posted December 30, 2007 Hi,Look at the wilcard, subdirectory optios, and Display in the zip in this thread; _FileWritFromArray will work.It is the ">" in the DOS command that loses the ANSI over 128 btw.Fast New ArrayDisplay with Fast Sort,Best, randallHi,I don't think you tried my script?i got an errorI presume therefore, you did not get this error with my script?Nor have you seen how easy it can be!Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now