Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

UTF-8 BOM marker @iniread failure

I have a UTF-8 encoded file.ini with the following contents where *BOM* represents the 2-byte unicode marker:

*BOM*[Section]
Target=..\file.ext

@iniread[".\file.ini",Section,Target] always returns the null string instead of the Target field value. After re-encoding file.ini to remove the BOM marker @iniread works correctly, so I'm thinking that @iniread get's confused by the BOM marker.
Versions: TCC 12.60, Windows XP 32.
 
I have a UTF-8 encoded file.ini with the following contents where *BOM* represents the 2-byte unicode marker:

*BOM*[Section]
Target=..\file.ext

@iniread[".\file.ini",Section,Target] always returns the null string instead of the Target field value. After re-encoding file.ini to remove the BOM marker @iniread works correctly, so I'm thinking that @iniread get's confused by the BOM marker.

@INIREAD (like most things in TCC and Windows, and everything in CMD) does not support UTF-8. Use UTF-16.
 

Similar threads

Back
Top