Hi there,
I created a script that reads files and directories from the file system.
However, the names of files and directories that have special characters are not properly assigned into vars
For example: there is a directory called "Conversação"
This name has been assigned as "Conversação" to the tcl list.
The part of code is:
set items [glob -nocomplain "/usr/local/aolserver/servers/cbm/Arquivos/*"]
ns_log Notice "ITEMS: $items"
which brings the following list:
Notice: ITEMS: /usr/local/aolserver/servers/cbm/Arquivos/Rodrigo {/usr/local/aolserver/servers/cbm/Arquivos/Arquivos Geral} /usr/local/aolserver/servers/cbm/Arquivos/Guilherme /usr/local/aolserver/servers/cbm/Arquivos/Informatica /usr/local/aolserver/servers/cbm/Arquivos/Conversação
I already check the system encoding
ns_log Notice "[encoding system]"
the result is iso8859-1
I also tried to force an encoding convertion as in the line:
set items [encoding convertto iso8859-1 $items]
At first i thought it was a matter of how error.log shows the stuff that is logged (showing bytes and chars UTF8). Even because the length of the words are the same.
But the error persists when i insert it in the file-storage. Which means the folder is created with the name "Conversação" instead of "Conversação"
I believe this issue is related to encoding.
What would be the correct encoding to latin america words?