[JIRA] (JENKINS-41729) Using utf-8 letters in property files

12 views
Skip to first unread message

devld@ikedam.jp (JIRA)

unread,
Feb 4, 2017, 10:57:01 PM2/4/17
to jenkinsc...@googlegroups.com
ikedam created an issue
 
Jenkins / Improvement JENKINS-41729
Using utf-8 letters in property files
Issue Type: Improvement Improvement
Assignee: ikedam
Components: core
Created: 2017/Feb/05 3:56 AM
Priority: Minor Minor
Reporter: ikedam

Property files for localization requires to be encoded in ISO-8859-1.
It results difficulties in reviewing localizing pull requires such as https://github.com/jenkinsci/maven-plugin/pull/86.
It would be nice if property files in source directories can be written in UTF-8 letters.

There are two approaches:

  1. Encode property files when compiling.
    • maven-resources-plugin copies files in the resources directory into the target directory. It doesn't provide a feature to encode property files.
    • Though native2ascii-maven-plugin encodes property files, it is provided only as beta for long time.
      • This might mean encoding property files in compilation time isn't a standard approach.
    • maven-antrun-plugin can run native2ascii (But it feels strange approach to me).
    • This approach would cause problems when testing plugins with "mvn hpi:run".
      • As property files aren't compiled and read from source directories directly at that time.
  2. Make libraries reading property files accept UTF-8 letters.

Actually, I'm not sure this is a good idea.
I created this ticket and will create pull requests to request comments about this idea.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

devld@ikedam.jp (JIRA)

unread,
Feb 4, 2017, 11:30:02 PM2/4/17
to jenkinsc...@googlegroups.com
ikedam started work on Improvement JENKINS-41729
 
Change By: ikedam
Status: Open In Progress

devld@ikedam.jp (JIRA)

unread,
Feb 4, 2017, 11:30:02 PM2/4/17
to jenkinsc...@googlegroups.com

devld@ikedam.jp (JIRA)

unread,
Feb 11, 2017, 10:26:01 PM2/11/17
to jenkinsc...@googlegroups.com
ikedam edited a comment on Improvement JENKINS-41729
https://github.com/ kohsuke stapler / localizer stapler /pull/ 13 105

devld@ikedam.jp (JIRA)

unread,
Feb 11, 2017, 10:26:04 PM2/11/17
to jenkinsc...@googlegroups.com

devld@ikedam.jp (JIRA)

unread,
Feb 11, 2017, 10:28:01 PM2/11/17
to jenkinsc...@googlegroups.com
ikedam commented on Improvement JENKINS-41729

The apparent problem is assuming that encoding is always UTF-8.

devld@ikedam.jp (JIRA)

unread,
Sep 15, 2019, 2:18:02 AM9/15/19
to jenkinsc...@googlegroups.com
ikedam stopped work on Improvement JENKINS-41729
 
Change By: ikedam
Status: In Progress Open
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

devld@ikedam.jp (JIRA)

unread,
Sep 15, 2019, 2:20:01 AM9/15/19
to jenkinsc...@googlegroups.com
ikedam commented on Improvement JENKINS-41729

I found existing property files are not encoded in ASCII, but ISO-8859-1.
See more details in https://github.com/stapler/stapler/pull/105.
ISO-8859-1 and UTF-8 are not compatible, and it looks difficult to detect decoding errors in Java.

It would be better to consider using XML property files: https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#loadFromXML-java.io.InputStream-

devld@ikedam.jp (JIRA)

unread,
Sep 22, 2019, 4:25:02 AM9/22/19
to jenkinsc...@googlegroups.com
ikedam started work on Improvement JENKINS-41729
 
Change By: ikedam
Status: Open In Progress

devld@ikedam.jp (JIRA)

unread,
Sep 22, 2019, 4:29:02 AM9/22/19
to jenkinsc...@googlegroups.com

devld@ikedam.jp (JIRA)

unread,
Sep 22, 2019, 5:31:02 AM9/22/19
to jenkinsc...@googlegroups.com

devld@ikedam.jp (JIRA)

unread,
Oct 27, 2019, 1:28:02 AM10/27/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages