User Tag List

Results 1 to 3 of 3

Thread: Saving and Loading Unicode from Ini File

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Floedekage's Avatar
    Join Date
    May 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Saving and Loading Unicode from Ini File

    So, I've tried to make an application that would help me index a large library of Vaporwave (a music genre that I am really in to).
    But many of these artists and song names have Japanese and other Unicode characters in them and I can't seem to load strings containing said characters correctly or save them.

    I've sat my runtime options "Input (if no byte-order mark)" to ANSI and "Output" to Unicode and in the Ini object i've checked the "UTF-8" setting, but this prevents anything from loading.
    If I on the other hand uncheck UTF-8 in the Ini object, it loads everything BUT the Unicode characters correctly.

    I've tried downloading and checking the same settings as in this thread (that DOES work): https://community.clickteam.com/threads/103378-Support-of-unicode-for-ini-files-under-html5

    I've attached my mfa, to use it all you need to do it choose any library and it will look for and use a info.ini file or if none exists create a new one.
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Floedekage's Avatar
    Join Date
    May 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I've narrowed down the issue.
    It can read files perfectly from a path name that has no Unicode characters, all strings are loaded correctly then.
    The issue arises when reading from a file on a path name containing Unicode, like "...\Music\Vaporwave Archive\TOYOTAセリカ\info.ini"

  3. #3
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    This is a known issue with this object. By default it uses the INI functions of the Windows API and those functions have no Unicode version. The "UTF8" option of this object only concerns the format of the INI file (which must be in UTF8 mode without BOM), it doesn't concern the pathname which is still accessed via the Windows INI function, i.e. it will work with a Japanese pathname only if the "Language for non-Unicode applications" option of Windows (in the Language parameters) is set to Japanese.

    There is a partial solution in the build 292 of Fusion. In this build the INI object has 2 new options (for Windows):

    - "Read changes from disk": this option is selected by default. If you unselect it, the INI file will be loaded when the frame starts and the content of the object won't be updated if the INI file changes while the frame is running. In this mode, the file is loaded into memory entirely when the frame starts and the object does not use the Windows INI API to read the file. Which mean this will solve your problem.

    - "Write changes to disk": if "Read changes from disk" is unselected, you can unselect "Write changes to disk" if you don't need changes to be saved to disk. If this option is selected, the changes will be written to the file using the Windows INI API, which mean this will fail in the case you mention (if the Language for non-Unicode apps option is not set to the same language).

    So, if you use read-only INI files, just unselect these options, and this should fix your problem.

    If you must write settings to disk, then maybe consider using the Registry object to save them to the Windows registry.

Similar Threads

  1. Saving and Loading Data File in HTML5 App - Possible?
    By drnebula in forum HTML5 Export Module 2.5
    Replies: 4
    Last Post: 10th November 2020, 12:54 PM
  2. Saving and Loading Array files in an apk file
    By PureCTRL in forum Android Export Module 2.5
    Replies: 1
    Last Post: 29th September 2017, 11:51 AM
  3. Problem with saving/loading an NVO array file from the Named Variable object?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th January 2012, 01:17 PM
  4. Saving/Loading from file my Actives Objects?
    By DJ_Wild in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th August 2007, 07:39 PM
  5. Saving and loading Unicode from files
    By Stereotype in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th April 2007, 01:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •