Code Monkey home page Code Monkey logo

Comments (2)

GerbilSoft avatar GerbilSoft commented on May 23, 2024

Commit a87c21e reworked RP_ExtractIcon and RP_ExtractImage to store the filename as an OLECHAR string, and RP_ShellPropSheetExt to store the filename as a TCHAR string. (LPOLESTR, LPTSTR)

Changing the underlying RpFile and/or RomDataFactory classes to provide UTF-16 overloads will require adding functions to romdata-3.dll, which may be considered a backwards-compatible change. On Linux, this would result in an SOVERSION 3.1 bump, but since this only affects the Windows version, there won't be any version bump. (Older versions of rom-properties that expect v3 will work with the newer v3 DLL, but newer versions won't work with the older v3 DLL.)

from rom-properties.

GerbilSoft avatar GerbilSoft commented on May 23, 2024

Instead of using WTF-8 conversions, I added UTF-16 overloads for the "important" functions. This allows UTF-16 filenames to be used directly with no conversion.

TODO: rpcli still uses UTF-8 filenames, so broken UTF-16 filenames can't be used there. However, the Windows command line will likely have issues with broken UTF-16 filenames anyway.

The following now support UTF-16:

  • RpFile
  • RomData (storing the UTF-16 filename for RomOps purposes)
  • RomDataFactory
  • various functions in FileSystem

The Windows COM classes now use RpFile's UTF-16 constructor.

NOTE: The UTF-16 functions are only available on Windows. Unix systems are still UTF-8 only. Qt/KDE doesn't have the unpaired surrogate issue because the native filesystem uses UTF-8, so Qt has to convert to/from UTF-16 anyway.

from rom-properties.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.