Created attachment 2303 [details]
Screenshots that contain corruptions. R 3.4.2 on the left (correct) and 3.4.3 on the right (corrupted).
This bug was found on the released version of R-3.4.3 64bit installer, but there was no appropriate choice on this Bugzilla so I chose R-devel (trunk).
Some (not all but many) Japanese sentences are completely corrupted on the installer. Please see the attachment that contains corrupted characters that I found. R 3.4.2 is shown on the left (correct) and 3.4.3 on the right (corrupted).
Hi Royota, thank you for reporting. We recently switched to another build system and this may be a side effect.
Could you help us narrow down the problem by testing if this also appears in the R 3.4.2 installer that we built using the new system? You can download a copy from https://ftp.opencpu.org/archive/r-release/R-3.4.2/
Moreover could report if you find other internationalization issues in R 3.4.3, or if was it only the installer that had the problem?
Hi Jeroen, thanks for your prompt answer.
Sure, I'll try 3.4.2 version soon. Currently only the installer has the i18n problem as far as I tried, but yes I will report another issue if exists.
Created attachment 2304 [details]
Screenshots with the 3.4.2 installer using the same installation system
The same problem occurs with the new 3.4.2 installer.
It seems that corrupted characters are actually in UTF-8 encoding but read as CP932 (default on Japanese Windows system). For example the code below shows the same result as 1.png that I uploaded at first.
> scan(file = "test.txt", what = character(), fileEncoding = "UTF-8")
Read 1 item
> scan(file = "test.txt", what = character(), fileEncoding = "cp932")
Read 1 item
In scan(file = "test.txt", what = character(), fileEncoding = "cp932") :
invalid input found on input connection 'test.txt'
So the problem would be fixed if we convert the corrupted files into CP932 encoding (from UTF-8), or modify the build system settings to read them as UTF-8.
If there's anything I can help, I will try it.
Turns out there are two flavors of InnoSetup: standard and unicode: http://www.jrsoftware.org/isdl.php
I have been using the standard version, which may be the problem. I am going to recreate the R installer using the unicode version of InnoSetup. This takes a while; will get back to you later today.
From the manual:
'To make the installer package (R-3.4.3-win.exe) we currently require the Unicode version of Inno Setup 5.3.7 or later from http://jrsoftware.org/. This is not included in Rtools*.exe.'
OK clear, so hopefully this fixes the issue. I had tested locally in English and Dutch so obviously encoding issues did not pop up.
The good thing is that we may just be able to update the R-3.4.3 installer on CRAN without a version bump or anything because the installed version of R is exactly identical. Only installer text is affected.
OK we have fresh builds of r-release r-patched and r-devel. Ryota could you try this new installer and see if the problem is resolved: https://ftp.opencpu.org/archive/r-release/R-3.4.3/
Alternatively you can try r-devel or r-patched from: https://ftp.opencpu.org/current/
Created attachment 2305 [details]
Changed but still corrupted in another way
Thank you, things have been changed, but are still corrupted in another way...
It seems to be identical to UTF-8 text read as Latin-1 (ISO-8859-1):
> scan(file = "test.txt", what = character(), fileEncoding = "latin1")
Read 1 item
(The above was run on Linux since it failed on Windows)
I found information that Inno Setup treat a file as UTF-8 if it has the BOM.
It's just a guess but it could answer the question why some sentences are displayed correctly while others are corrupted. Or there could be another setting parameter or etc.
That may be a correct guess. I have pushed a small fix to the build script and ran yet another build just now. Could you try the new installer from https://ftp.opencpu.org/archive/r-release/R-3.4.3/ (with timestamp 2017-12-06 10:28)?
Hi Jeroen, it works perfectly!
Created attachment 2306 [details]
Screenshot after fix on the instlattion script
OK fantastic. Thank you Ryota, for reporting this and your help in debugging it. I'll try to publish the fixed installer to CRAN asap.
Thank you Jeroen, I really appreciate the fact that Windows installers are still available on CRAN.