mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 08:19:29 +02:00
The sources of the Free Pascal compiler, RTL, packages and utilities.
See https://www.freepascal.org/ for more info.
![]() resourcestring data .rsj files in case the source file is interpreted as UTF-8. Previously, the individual UTF-8 bytes were each stored in a separate widechar in the Json file (mantis #28717) * due to the fact that rstconv didn't use the cwstring unit on Unix, rstconv until now just concatenated the bytes stored in the widechars of the Json file on those platforms, i.e., the strings put in the resource file were byte for byte equal to what was in the source file. On Windows, these bytes were interpreted as individual widechars, converted to the DefaultSystemCodePage and then written. This means that for anything but ISO-8859-1 (where every widechar from #0000 to #0255 maps to #0 to #255), the output got corrupted. In order to keep compatibility with the old behaviour whereby rstconv wrote the resource strings using the same encoding as in the source file (except if the data got completely corrupted, in which case compatibility is useless), we now store all resourcestrings twice in the .rsj file: once as the exact byte sequence from the source file, and once (properly) encoded in UTF-16. By default, rstconv will use the byte string and just write that one to the resource file. Additionally, there is a new -p option that accepts a code page name (see rstconv -h for the list of supported names), which can be used to make rstconv use the UTF-16 version and convert that to the desired code page (as long as the system on which rstconv runs supports that codepage). And this also finally resolves mantis #6477. git-svn-id: trunk@31881 - |
||
---|---|---|
compiler | ||
ide | ||
installer | ||
packages | ||
rtl | ||
tests | ||
utils | ||
.gitattributes | ||
.gitignore | ||
fpmake_add1.inc | ||
fpmake_proc1.inc | ||
fpmake.pp | ||
Makefile | ||
Makefile.fpc |