JDK-8011105 : Locale Issue in the Native Function GetLastErrorString()
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-03-29
  • Updated: 2013-07-26
  • Resolved: 2013-07-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Relates :  
Description
When removing the use of JVM_* functions from java.io code in JDK-8001334, we remove JVM_GetLastErrorString() function and bring over the codes in os::lasterror into getLastErrorString() in io_util_md.c file.

The locale of the error messages needs to be examined based on the localized OS version.
Comments
The issue is fixed in JDK-8016579.
26-07-2013

Please, look at webrev http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016579/webrev.00/
15-07-2013

Seems I am blocked in JDK-6927425 (process) Decode system error messages (win).
29-04-2013

Comment from Alexey Utkin, Can I say two word about the file http://cr.openjdk.java.net/~dxu/8001334/webrev.01/src/windows/native/java/io/io_util_md.c.frames.html and function getLastErrorString(char *buf, size_t len) Here is the documentation for [FormatMessage]: http://msdn.microsoft.com/en-gb/library/windows/desktop/ms679351%28v=vs.85%29.aspx if you are using ASCII version of FormatMessage that is a good idea to have the direct reference to [FormatMessageA], not define. The second word is about the third world countries: Russia and China. Windows OS has localized version. The error messages on that systems would contains only [?] in the worst case. =========================== dwLanguageId [in] The language identifier for the requested message. This parameter is ignored if dwFlags includes FORMAT_MESSAGE_FROM_STRING. If you pass a specific LANGID in this parameter, FormatMessage will return a message for that LANGID only. If the function cannot find a message for that LANGID, it sets Last-Error to ERROR_RESOURCE_LANG_NOT_FOUND. !!!!------------>If you pass in zero, FormatMessage looks for a message for LANGIDs in the following order: Language neutral Thread LANGID, based on the thread's locale value User default LANGID, based on the user's default locale value System default LANGID, based on the system default locale value US English <-------------!!!! If FormatMessage does not locate a message for any of the preceding LANGIDs, it returns any language message string that is present. If that fails, it returns ERROR_RESOURCE_LANG_NOT_FOUND. ===========================
29-03-2013