ReadFile problem...
BlitzMax Forums/BlitzMax Programming/ReadFile problem...
| ||
Hi, I'm at work and at the moment I'm using a program written for my jobs. The program require some file-path (for .xls files) and then pass these paths to another program to 'convert' them. The program (initial release) was written with Bmax 1.33 - and togheter with many other programs I'm using - has worked fine. Yesterday I've made a little change (I add a new item to write in a file, nothing 'strange') and compiled with Bmax 1.34. Today - the program give me strange results - as it cannot read anymore the 'file path'. This is an extract of the log file of my program 08:10:59 : FIle :<C:\Documents and Settings\All Users\Documenti\DOCUMENTI_CHR\__Programmi_Vari\xls2csv.exe> 08:10:59 : Manco : <C:/Documents and Settings/All Users/Documenti/DOCUMENTI_CHR/Contabiltà/MANCO_VENDITA_2009.csv> 08:10:59 : Motoauto : <C:/Documents and Settings/All Users/Documenti/DOCUMENTI_CHR/Contabiltà/MANCO_VENDITA_2009.csv> 08:11:07 : Lettura file Estratto conto... 08:11:07 : File <C:\Documents and Settings\All Users\Documenti\DOCUMENTI_CHR\__PremiOriginaliRenault\estratto conto_Maggio 2009.txt> 08:11:07 : --------------------------------------------------------- 08:11:07 : Data <01_05_2009> 08:11:07 : 08:11:07 : Lettura terminata... 08:11:07 : Totale telai trovati : 79 Valore totale: 87100 08:11:07 : Lettura premi di MANCO 08:11:07 : Lettura file: c:\documents and settings\all users\documenti\documenti_chr\contabilt \manco_vendita_2009.csv 08:11:07 : Errore lettura file! 08:11:07 : Lettura premi di MOTOAUTO 08:11:07 : Lettura file: c:\documents and settings\all users\documenti\documenti_chr\contabilt \motoauto_vendita_2009.csv 08:11:07 : Errore lettura file! 08:11:07 : Controllo per MANCO (of course is in italian, but you can see the 'bolded' strings are different for only one character in the word 'contabilità'. I suspect there could be some problem with UFT (characters)...in readfile? For comparison this is an extract of a log file of another program I'm using (compiled in 1.33) : FIle :<C:\Documents and Settings\All Users\Documenti\DOCUMENTI_CHR\__Programmi_Vari\xls2csv.exe> 08:14:40 : Manco : <C:/Documents and Settings/All Users/Documenti/DOCUMENTI_CHR/Contabiltà/MANCO_VENDITA_2009.csv> 08:14:40 : Motoauto : <C:/Documents and Settings/All Users/Documenti/DOCUMENTI_CHR/Contabiltà/MANCO_VENDITA_2009.csv> 08:14:42 : Apertura file :C:\Documents and Settings\All Users\Documenti\DOCUMENTI_CHR\Contabiltà\MANCO_VENDITA_2009.csv per <MANCO> 08:14:42 : Lettura dati... 08:14:42 : Apertura file :C:\Documents and Settings\All Users\Documenti\DOCUMENTI_CHR\Contabiltà\MOTOAUTO_VENDITA_2009.csv per <MOTOAUTO> 08:14:42 : Lettura dati... You can see the 'à' character is kept. I can assure I'm using ALL standard Bmax commands (ReadFile, WriteFile) nothing 'fancy or exotic' modules. When I'm back home I'll post the code. Any suggestion? [of course this mean I need to make manually a tedious and boring work today...checking more than 100s chassis number is not very exciting...sigh!] |
| ||
There is definitely a unicode problem somewhere in your "pipeline". I would have expected 1.34 to be better than 1.33 though, with respect to unicode file-system support. |
| ||
If you're reading this text from a file, be sure to be loading the text with the appropriate encoding. by default it is LATIN, that is not multilingual as UTF8. |
| ||
I've posted in the bug section. To be honest the 'suspect' is the Lower function,that 'loses' the UTF characters... |