<div dir="ltr"><div dir="ltr"><div>The pull request at <a href="https://github.com/openjdk/jdk/pull/16971/files">https://github.com/openjdk/jdk/pull/16971/files</a> has effectively addressed the issue I was facing.</div><div>Thank you for your time and effort in addressing this matter!</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Magnus Ihse Bursie <<a href="mailto:magnus.ihse.bursie@oracle.com">magnus.ihse.bursie@oracle.com</a>> 于2023年12月5日周二 18:36写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
  <div>
    <p>On closer inspection, it would probably be more prudential to set
      the value of LC_ALL to C.UTF-8 in the build. It will likely help
      you with your problem. I have published a PR at
      <a href="https://github.com/openjdk/jdk/pull/16971" target="_blank">https://github.com/openjdk/jdk/pull/16971</a> (JDK-8321373).</p>
    <p>/Magnus<br>
    </p>
    <div>On 2023-11-24 13:08, Magnus Ihse Bursie
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <p>Are you running on Ubuntu properly, or Ubuntu in WLS? If it is
        the former, the it is not the same problem as the other poster,
        which were running on Windows.</p>
      <p>The JDK build uses the "C" locale. This should be set
        automatically by the build system, so it should just work. But
        in case there is some bug, try exporting LC_ALL=C before
        building and see if it helps.</p>
      <p>Also, the point of LC_ALL is that you can specify it instead of
        all the detailed LC_* variables...</p>
      <p>/Magnus<br>
      </p>
      <div>On 2023-11-24 08:41, last last wrote:<br>
      </div>
      <blockquote type="cite">
        <div dir="ltr">
          <div><span style="color:rgb(15,15,15);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;white-space:pre-wrap">
</span></div>
          <span style="white-space:pre-wrap"><div><font face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji" color="#0f0f0f"><span style="font-size:16px">I am currently facing the same error when build paths include Chinese characters</span></font>  ,<span style="font-size:16px;color:rgb(15,15,15);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"">after setting the environment variable "export LC_ALL=zh_CN.UTF-8"  .</span><span>The testing environment is also Ubuntu 2004.</span></div></span><span style="white-space:pre-wrap"><div><font face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji" color="#0f0f0f"><span style="font-size:16px">
</span></font><span style="color:rgb(15,15,15);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px">The system locale settings are as follows:</span><font face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji" color="#0f0f0f"><span style="font-size:16px">
</span></font>LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
<font face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji" color="#0f0f0f"><span style="font-size:16px">
</span></font></div></span><span style="color:rgb(15,15,15);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;white-space:pre-wrap">I'm wondering if there are any other system configurations that could help resolve this problem. Your insights would be greatly appreciated.</span><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">Magnus Ihse Bursie <<a href="mailto:magnus.ihse.bursie@oracle.com" target="_blank">magnus.ihse.bursie@oracle.com</a>>
            于2023年11月23日周四 22:30写道:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Congratulations!
            You get to test drive the recently updated build <br>
            instructions for Windows locale requirements! :-)<br>
            <br>
            Please see <br>
            <a href="https://github.com/openjdk/jdk/blob/master/doc/building.md#locale-requirements" rel="noreferrer" target="_blank">https://github.com/openjdk/jdk/blob/master/doc/building.md#locale-requirements</a><br>
            <br>
            In particular, I believe you need to set your system locale.<br>
            <br>
            Please report back if that solves the problem or not.<br>
            <br>
            /Magnus<br>
            <br>
            <br>
            On 2023-11-23 03:51, last last wrote:<br>
            > Hi all,<br>
            ><br>
            > I tried to build a OpenJDK11 fastdebug with paths that
            include Chinese <br>
            > characters,my build path is
            "/home/kylin/图片/jdk11u-dev",but i saw some <br>
            > error as followings:<br>
            ><br>
            > Exception in thread "main"
            java.nio.file.InvalidPathException: <br>
            > Malformed input or input contains unmappable
            characters: <br>
            >
/home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.tmp<br>
            > at
            java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)<br>
            > at
            java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)<br>
            > at
            java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)<br>
            > at java.base/java.nio.file.Path.of(Path.java:147)<br>
            > at java.base/java.nio.file.Paths.get(Paths.java:69)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)<br>
            > make[3]: *** [ToolsLangtools.gmk:40: <br>
            >
/home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch]
            <br>
            > Error 1<br>
            > make[2]: *** [make/Main.gmk:73: buildtools-langtools]
            Error 2<br>
            > make[2]: *** Waiting for unfinished jobs....<br>
            > Exception in thread "main"
            java.nio.file.InvalidPathException: <br>
            > Malformed input or input contains unmappable
            characters: <br>
            >
/home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.tmp<br>
            > at
            java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)<br>
            > at
            java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)<br>
            > at
            java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)<br>
            > at java.base/java.nio.file.Path.of(Path.java:147)<br>
            > at java.base/java.nio.file.Paths.get(Paths.java:69)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)<br>
            > make[3]: *** [gensrc/GensrcJvmti.gmk:45: <br>
            >
/home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch]
            <br>
            > Error 1<br>
            > make[3]: *** Waiting for unfinished jobs....<br>
            > Exception in thread "main"
            java.nio.file.InvalidPathException: <br>
            > Malformed input or input contains unmappable
            characters: <br>
            >
/home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.tmp<br>
            > at
            java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)<br>
            > at
            java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)<br>
            > at
            java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)<br>
            > at java.base/java.nio.file.Path.of(Path.java:147)<br>
            > at java.base/java.nio.file.Paths.get(Paths.java:69)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)<br>
            > make[3]: *** [gensrc/GensrcJfr.gmk:43: <br>
            >
/home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch]
            <br>
            > Error 1<br>
            > make[2]: *** [make/Main.gmk:265: hotspot-server-gensrc]
            Error 2<br>
            ><br>
            > ERROR: Build failed for target 'images' in
            configuration <br>
            > 'linux-aarch64-normal-server-fastdebug' (exit code 2)<br>
            ><br>
            > === Output from failing command(s) repeated here ===<br>
            > * For target <br>
            >
            buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch:<br>
            > Exception in thread "main"
            java.nio.file.InvalidPathException: <br>
            > Malformed input or input contains unmappable
            characters: <br>
            >
/home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.tmp<br>
            > at
            java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)<br>
            > at
            java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)<br>
            > at
            java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)<br>
            > at java.base/java.nio.file.Path.of(Path.java:147)<br>
            > at java.base/java.nio.file.Paths.get(Paths.java:69)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)<br>
            > * For target <br>
            >
hotspot_variant-server_buildtools_tools_classes__the.BUILD_JFR_TOOLS_batch:<br>
            > Exception in thread "main"
            java.nio.file.InvalidPathException: <br>
            > Malformed input or input contains unmappable
            characters: <br>
            >
/home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.tmp<br>
            > at
            java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)<br>
            > at
            java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)<br>
            > at
            java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)<br>
            > at java.base/java.nio.file.Path.of(Path.java:147)<br>
            > at java.base/java.nio.file.Paths.get(Paths.java:69)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)<br>
            > * For target <br>
            >
            hotspot_variant-server_tools_jvmti__the.BUILD_JVMTI_TOOLS_batch:<br>
            > Exception in thread "main"
            java.nio.file.InvalidPathException: <br>
            > Malformed input or input contains unmappable
            characters: <br>
            >
/home/kylin/??????/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.tmp<br>
            > at
            java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)<br>
            > at
            java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)<br>
            > at
            java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)<br>
            > at java.base/java.nio.file.Path.of(Path.java:147)<br>
            > at java.base/java.nio.file.Paths.get(Paths.java:69)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.loadCmdFile(CommandLine.java:128)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.appendParsedCommandArgs(CommandLine.java:71)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:102)<br>
            > at <br>
            >
jdk.compiler/com.sun.tools.javac.main.CommandLine.parse(CommandLine.java:123)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:215)<br>
            > at
            jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)<br>
            > at
            jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)<br>
            ><br>
            > * All command lines available in <br>
            >
/home/kylin/图片/jdk11u-dev/build/linux-aarch64-normal-server-fastdebug/make-support/failure-logs.<br>
            ><br>
            > ----------<br>
            > This error only arises when the compilation path
            contains Chinese <br>
            > characters. There is no such problem with the
            compilation path in <br>
            > English. The testing environment is Ubuntu 20.04.<br>
            > I also tested having the compilation path include
            German and French <br>
            > characters, and encountered the same compilation
            issues.<br>
            ><br>
            > Is this considered an issue? If it is, can it be added
            to the Java Bug <br>
            > System?<br>
          </blockquote>
        </div>
      </blockquote>
    </blockquote>
  </div>

</blockquote></div>