https://github.com/bjansen/sepa-conversion-tool
A Java library that implements the SEPA conversion table provided by the EPC
https://github.com/bjansen/sepa-conversion-tool
charset-conversion converter converter-library sepa
Last synced: 3 months ago
JSON representation
A Java library that implements the SEPA conversion table provided by the EPC
- Host: GitHub
- URL: https://github.com/bjansen/sepa-conversion-tool
- Owner: bjansen
- License: gpl-3.0
- Created: 2019-01-09T09:54:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-21T16:25:46.000Z (over 5 years ago)
- Last Synced: 2025-02-28T08:16:54.591Z (3 months ago)
- Topics: charset-conversion, converter, converter-library, sepa
- Language: Java
- Size: 90.8 KB
- Stars: 6
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sepa-conversion-tool 
A Java library that implements the [SEPA conversion table](https://www.europeanpaymentscouncil.eu/document-library/guidance-documents/sepa-requirements-extended-character-set-unicode-subset-best)
provided by the [EPC](https://www.europeanpaymentscouncil.eu/)## Example
```java
@Test
void convertSample() {
SepaCharacterConverter converter = SepaCharacterConverter.basicLatin();// characters that don't need conversion are preserved
assertEquals("hello", converter.convertToSepaCharacters("hello"));// characters that need conversion are replaced
assertEquals("Hello", converter.convertToSepaCharacters("Ħĕŀŀœ"));// characters that are outside of the range of the convertion table are dropped
assertEquals("outside of range", converter.convertToSepaCharacters("outsi�de o�f r≧an∰g℗e"));
}```
## Usage
The library can be imported to Maven projects like this:
```xml
com.github.bjansen
sepa-conversion-tool
0.2.0```
The next step is to choose your converter, and use it:
```java
SepaCharacterConverter converter = SepaCharacterConverter.basicLatin();
// or SepaCharacterConverter.longTermSepa()String converted = converter.convertToSepaCharacters("Ħĕŀŀœ"); // will be converted to "Hello"
```