This project has moved and is read-only. For the latest updates, please go here.

Caracteres Especiais

May 24, 2012 at 9:05 PM

Olá Erik,

 

Notei um problema quando efetuo o replace em alguns XMLs que possuo em caracteres especiais como ç, ã, õ,, á, é, í etc

como é antes do replace:   recepção

como ficou depois do replace: recep??o

 

Tem alguma idéia de como resolver?

---------------------------------------------------------------------------------------

Hello Erik,



I noticed a problem when I make the replace in some XML that I have special characterslike ç, ã, õ,, á, é, í, etc.

replace as before: reception

as it was after replace: receiver? the



Any idea how to solve?

May 25, 2012 at 8:36 AM

Hi, 

Can you include a sample of the file you are trying to replace characters in and command line text that doesn't work.

 

Regards,

 

Eric

May 25, 2012 at 5:04 PM

 

following excerpt

<Command>"Arquivo disponivel para recepção: CONSIG  "TrkSubString($ProtocolParameter, 0, 6)"",</Command>            <Command>"Dados do arquivo disponivel para recepção\n</Command>            <Command>\n</Command>            <Command>\n</Command>            <Command>Data:$EventDate\n</Command>            <Command>Hora de Chegada:$EventTime\n</Command>            <Command>Quantidade de Registro:$RecordNumber\n</Command>            <Command>Nome do Arquivo:"TrkSubString($ProtocolParameter, 6, TrkLength($ProtocolParameter))"\n</Command>            <Command>\n</Command>            <Command>Numero do Protocolo:$ProtocolId\n</Command>            <Command>")</Command>

 

Infelizmente não posso enviar o XML inteiro por motivo de segurança. Mas a palavra recepção acaba sendo alterada para recep??o sendo que o trecho trocado foi outro.
Muito Obrigado
Jean Rodrigo

May 25, 2012 at 5:05 PM

Sorry, the following excerpt translated ...


Unfortunately I can not send the entire XML for security reasons. But the word receivingends up being changed to receiver? Being that the passage was changed another.

Thank you

Jean Rodrigo

May 30, 2012 at 9:44 AM

Hi Jean,

I am having some difficulty understanding the issue.  I think google translate may be screwing up translation a bit.

Are you trying to run replace from command line or GUI?  

 

I have previously experienced issues running Replace with characters you mentions from Batch file.  After doing a little research I found the solution here:

http://stackoverflow.com/questions/1427796/batch-file-encoding. It worked great.

 

Please let me know if this fixes your issue.

 

Eric

 

 

 

May 30, 2012 at 9:47 AM

If solution above doesn't work, can you try the latest BETA that has some encoding enhancements mentioned here:

http://findandreplace.codeplex.com/workitem/2

 

The issue could be related with file encoding not being properly detected.

 

Eric

Jul 16, 2012 at 2:07 PM

Good morning Eric,

 

First sorry for the delay in returning the result, but my boss was absent some time and took some things that I took the focus. Version 1.2 of fnr.exe solved the problem perfectly. Thank you and congratulations for your work.

 

Cordially

Jean Rodrigo

Feb 26, 2013 at 9:39 AM
Hi,

I got latest version 1.2. I have a problem with special danish characters like Ø, å, æ. The sample workflow is as follows.

1) Input file, .sql extension. It has words like gør.
2) Irrespective of replace with any word, Whatever the words contains above characters is replaced with unknown characters.

Could you please help on that?

Regards,
Bharath
Feb 26, 2013 at 10:54 AM
Hi,

I figure out the problem, The input file is encoding with 'Western European (Windows)'
And then I have changed to Unicode, It works fine for my danish characters. ø. å, æ.

Sorry for that. It is awesome tool.

Regards,
Bharath
Apr 8, 2013 at 4:28 AM
I am having the same problem with FNR v1.2 on Windows 64-bit Retail, exported some data out of SQL to a text file and need to replace special characters with my own specific find/replaces (not whatever a unicode conversion does). The FNR GUI program works great on the text file and finds/replaces the special characters without any problem, however when I use the "Gen Replace Command Line" and copy the script commands exactly as is into a DOS batch command line script and run it then it doesn't find the special characters at all and thus no replaces. The file is probably is Western European (Windows) format (notepad calls it ANSI) but simply opening the file in notepad, changing the formatting to Unicode is not a good solution for me as it converts the special characters to stuff that I don't want. Again, everything works fine in the GUI version of FNR, just not the command line version. Command line script:

"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "½" --replace " 1/2"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "¾" --replace " 3/4"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "¼" --replace " 1/4"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "é" --replace "e"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "è" --replace "e"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "®" --replace ""
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "©" --replace ""
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "”" --replace "\""
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "“" --replace "\""
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "‘" --replace "'"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "’" --replace "'"
"C:\fnr.exe" --cl --dir "C:\test" --fileMask ".txt" --excludeFileMask ".dll, *.exe" --find "–" --replace "-"