On Mon, Jan 7, 2019 at 11:58 PM Christopher Schultz
<ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Mark,
>
> On 1/6/19 17:12, Mark Thomas wrote:
> > On 06/01/2019 21:51, Christopher Schultz wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
> >>
> >> Mark,
> >>
> >> On 1/6/19 16:37, Mark Thomas wrote:
> >>> On 06/01/2019 17:40, Christopher Schultz wrote:
> >>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
> >>>>
> >>>> Woonsan,
> >>>>
> >>>> On 1/4/19 05:11, Woonsan Ko wrote:
> >>>>> I've noticed in the commit messages that some i18n bundle
> >>>>> files showing Japanese correctly (e.g,
> >>>>> tomcat/trunk/java/org/apache/catalina/authenticator/LocalStrings_j
> a.
> >>
> >>>>>
> pr
> >>>>
> >>>>>
> >> operties
> >>>>>
> >>>>>
> >>>> below) while scrambling it in others (e.g,
> >>>>> tomcat/trunk/java/javax/el/LocalStrings_ja.properties
> >>>>> below).
> >>>>>
> >>>>> The difference comes from whether or not the file was set
> >>>>> with svn property, "svn:mime-type", to "text/plain;
> >>>>> charset=UTF-8".
> >>>>>
> >>>>> $ svn propget svn:mime-type
> >>>>> java/org/apache/catalina/authenticator/LocalStrings_ja.properties
> >>>>>
> >>>>>
> >>
> >>>>>
> text/plain; charset=UTF-8 $ svn propget svn:mime-type
> >>>>> java/javax/el/LocalStrings_ja.properties svn: warning:
> >>>>> W200017: Property 'svn:mime-type' not found on
> >>>>> 'java/javax/el/LocalStrings_ja.properties'
> >>>>>
> >>>>> Would anyone mind if I set "svn:mime-type" to "text/plain;
> >>>>> charset=UTF-8" in all the non-English .properties files in
> >>>>> trunk?
> >>>
> >>> +1. It is an oversight that I haven't been doing this when
> >>> adding new files.
> >>>
> >>>> - -1
> >>>>
> >>>> Properties files are, by definition[1], in ISO-8859-1
> >>>> encoding. Characters that are not in the ISO-8859-1 character
> >>>> set need to be Unicode-escaped.
> >>>>
> >>>> For example, if you want ã you need to use \u00e3
> >>>>
> >>>> I'm not sure why the files haven't been formatted in this way
> >>>> so far.
> >>>
> >>> Because that is what we decided to do to make the files easier
> >>> to work with:
> >>> https://tomcat.markmail.org/thread/2fqmyn2ds3vcmfvw
> >>
> >> I don't see any invocation of native2ascii in any of the build
> >> tools.
> >>
> >> Is it an undocumented "feature" of
> >> ResourceBundle/PropertyResourceBundle that UTF-8-encoded files
> >> "just work"?
> >
> > No.
> >
> > Read the thread I referenced in my previous message and/or search
> > build.xml for 'native2ascii'.
>
> My apologies. I looked for the conversion in the build script and
> didn't find it for some reason. Probably a typo in the search.
>
> Woonsan, my -1 is now a +1 for changing the MIME-types of any
> .properties files that aren't already set, and to actually use that
> encoding wherever it makes sense in preference to \u notation.

Thanks, Chris and Mark!
I've committed the changes (r1850710) after these:

find java -name "LocalStrings_*.properties" -exec svn propset
svn:mime-type "text/plain; charset=UTF-8" {} \;
find java -name "Messages_*.properties" -exec svn propset
svn:mime-type "text/plain; charset=UTF-8" {} \;

When someone adds a new language set later, we can run those again.

Cheers,

Woonsan

>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwzaR8ACgkQHPApP6U8
> pFjJAA/+LNkhdieCQm6ZA5BIf8xR/5VIdNizGK6aRzDGVHd0685xzfm51KdjI22h
> KOpsOipRqH0lVoJ0kcfLTj7vdjafgt/B9FRZtmixeuHJ6quw9BVsfHT/kF2eojzQ
> ndOBWqLSO2ucQtZ/bS7BoZzCxWbakE+DaCsLlOCbgzcb3uh3UOWCWotlEHHt0CG6
> kM6QsZANyj+rVGu90Wz4W2LKP0fEkk39MgzIPMcEYh9xWRRC5RENBNzpmxMRGLUq
> BMbVrMhNGtJTsWZdUis1AXheYuCyAlZbNbkwLJKOsBRo3Y3LpLR9jDTi3Nln8H0L
> 49e1sqoHhSvR/trbfzDBxDtFTovPiKkddrqaRVT6moZYDif/i4Cbe27DVpWh1Ptf
> EpGylmCLXjPyFzchrrjMQtE0uoUAA1aXAcaZnf4cJX/yULi2ZdhIkjA8eA+8ZRJ/
> L3w8EhAg83y2JI22En2zkjFOyhGTANECiXzH+JXVvm44v9G/qIxxG/YQQeJvPyM9
> 3BV5bXSNmafR2m2GV34Bldckk+9LtZM0xLuTGuYS8WEoMpGG9/I0dnYdHj8jLPFu
> 7W4qyryqlVRhxGT0SkiY8Q6uLnD84sxhNhPLuJIw196qNYidOcS2iDF+n5GqdbZA
> bYHWSawFDGbKfZjwJciX00VKr+m2p+09Znx3CegrTL693p+lVqQ=
> =fZ4Z
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to