Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#1167 closed Patch (invalid)

RC files update for Unicode, NL typo fix, UTF-16 conversions

Reported by: janwillem32 Owned by:
Priority: normal Milestone:
Component: General Version: nightly, specify
Severity: minor Keywords:
Cc: Evaluation:


The RC compiler currently has a problem (no other compilers have this problem):

RC files will have to be stored as either ANSI or UTF-16. ANSI files can be normally patched, UTF-16 files need complete uploads to the SVN. All other file types can be converted to UTF-8 without any problems, including the mpcresources\text and resource.h files.
If the RC compiler receives an update to handle UTF-8, I think it's a good idea to convert absolutely all files to UTF-8 (even ANSI files) to get some unification. Updates of ANSI to UTF-8 can be processed by a normal .patch update, it will indicate that the first line of a file changed, along with any characters that use code point 128 and higher. There's a small exception for the .bat utilities, these need conversion to Powershell items to be able to handle Unicode input.
Some of the current RC files can be saved as ANSI, to make them patchable.

I included a .patch file to change the wrong code page extensions to indicate that the whole program should compile for Unicode (UTF-8 extensible), for patchable ANSI RC files. Non-patchable files are included in the 7z file.
Converted to ANSI (these RC files already only use ANSI characters):
mplayerc.??.rc: it, ca, es, de, fr, nl, sv, br

Converted to UTF-8 (not RC files):
mpcresources\text files

Remained UTF-16 (these RC files already use characters that are not included in ANSI):
mplayerc.??.rc: by, cz, hu, hy, ja, kr, pl, ru, sc, sk, tc, tr, ua

NL typo fix: afsplem to afspelen.
I marked this item as "critical", because this revision has to happen before any of these files are changed.
These items are based on the build 2937.
No actual new functions or fixes beyond Unicode changes are applied in this fix.

Change History (9)

comment:1 Changed 6 years ago by janwillem32

The 7z file is 563.63 KB, so I uploaded it to my folder:

comment:2 Changed 6 years ago by nevcairiel

The encoding of all RC files should be consistent. So all .rc files will remain UTF-16 until the day when we can convert them to UTF-8.
Using ANSI encodings is a bad idea in general, anyway.

Converting the other files to UTF-8 is a possibility, but it has to be checked first if the perl scripts can properly convert them to UTF-16 when generating the .rc files out of them.

comment:3 Changed 6 years ago by janwillem32

The current RC files are already mixed UTF-16 and ANSI. That's why I created the .patch file for RC files that are already ANSI encoded.
I can imagine that managing mixed UTF-16 and ANSI main language files is too hard to keep track of. In that case, it's better to set the mplayerc.??.rc files to to UTF-16 (and maybe the main mplayerc.rc file, too).
If the perl scripts take account of the byte-order mark of the text file, they should have no problem with it. This does indeed have to be tested.

comment:4 Changed 6 years ago by sansnom05

Currently all rc files and text files for rc files are UTF-16 LE with BOM, no ANSI or UTF-8. Please use some hex editor to verify that.

comment:5 Changed 6 years ago by sansnom05

I mean all rc/text files for mpc-hc for now.

comment:6 Changed 6 years ago by janwillem32

The mplayerc.??.rc and mplayerc.rc are the only RC files in UTF-16 (I left them in UTF-16 this time).
All others are ANSI, that's why I could make a patch file for them in the first place.
The updated file for r2947 is in my folder: .

comment:7 Changed 5 years ago by xhmikosr

  • Cc xhmikosr added
  • Severity changed from critical to minor

comment:8 Changed 5 years ago by janwillem32

  • Resolution set to invalid
  • Status changed from new to closed

comment:9 Changed 4 years ago by xhmikosr

  • Cc xhmikosr removed
  • Milestone 1.6.x deleted
Note: See TracTickets for help on using tickets.