Sign in to follow this  
Followers 0
kopola

problem with the "é" ^^

20 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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?

:P

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 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

Share this post


Link to post
Share on other sites

default ansi, like filewrite .

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by kopola

Share this post


Link to post
Share on other sites

plz can i have help??

Share this post


Link to post
Share on other sites

1 post is suffient...but we dont really suppost foriegn languages not sure autoit will work with this purpose. sorry.

Share this post


Link to post
Share on other sites

$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

Share this post


Link to post
Share on other sites

Sowwie :)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

but how can i have the full path ? and how to have only the file i want :)

Edited by kopola

Share this post


Link to post
Share on other sites

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

:P


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

Share this post


Link to post
Share on other sites

$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

Share this post


Link to post
Share on other sites

#15 ·  Posted (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 by kopola

Share this post


Link to post
Share on other sites

what is wrong with that? :)

Share this post


Link to post
Share on other sites

please help me :P:)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Search 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

Share this post


Link to post
Share on other sites

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

Hi,

I don't think you tried my script?

i got an error

I presume therefore, you did not get this error with my script?

Nor have you seen how easy it can be!

Best, randall

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0