Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Resource bundle control which uses a specific a charset to load resource bundles backed by property files.
Java
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
LICENSE.txt
README.md
pom.xml

README.md

java-util-resource-bundle-charset-control

Resource bundle control which uses a specific charset to load resource bundles backed by property files.

License

Released under the permissive MIT License.

Author

Kohányi Róbert.

Download

Add the library as a dependency in your project's pom.xml like this.

<dependency>
  <groupId>com.github.kohanyirobert</groupId>
  <artifactId>java-util-resource-bundle-charset-control</artifactId>
  <version>...</version>
</dependency>

Releases and snapshots are deployed to Sonatype's OSS repository (and synced to the Central Maven Repository from there). To download JARs from Sonatype's repository include the following repository tag inside your Maven installation's settings.xml or your project's pom.xml.

<repository>
  <id>sonatype-oss</id>
  <url>https://oss.sonatype.org/content/groups/public</url>
</repository>

Build

As the project is managed with Maven you simply clone it and issue mvn install or mvn package inside the clone's directory.

git clone git://github.com/kohanyirobert/java-util-resource-bundle-charset-control.git
cd java-util-resource-bundle-charset-control/
mvn package
# and/or
mvn install

Usage

String baseName = ...
Charset charset = ...
Control control = new CharsetControl(charset);
ResourceBundle bundle = ResourceBundle.getBundle(baseName, control);

Note

If you plan to reload the same resource bundle using different charsets then you should clear the resource bundle cache before subsequent reloads.

ResourceBundle.clearCache();
Something went wrong with that request. Please try again.