| 1 | /* |
| 2 | * Copyright (C) 2009. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 3 or |
| 6 | * version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, but |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 | * General Public License for more details. |
| 12 | */ |
| 13 | package uk.me.parabola.imgfmt.app.labelenc; |
| 14 | |
| 15 | /** |
| 16 | * Interface for transliterator functions. |
| 17 | * |
| 18 | * @author Steve Ratcliffe |
| 19 | */ |
| 20 | public interface Transliterator { |
| 21 | /** |
| 22 | * Convert a string into a string that uses only ascii or latin1 characters. |
| 23 | * |
| 24 | * @param s The original string. It can use any unicode character. Can be null in which |
| 25 | * case null will be returned. |
| 26 | * @return A string that uses a restricted subset of characters (ascii or |
| 27 | * latin) that is a transliterated form of the input string. |
| 28 | */ |
| 29 | public String transliterate(String s); |
| 30 | |
| 31 | /** |
| 32 | * Force the use of uppercase in this transliterator. |
| 33 | * Note that it is normal to set this. |
| 34 | */ |
| 35 | public void forceUppercase(boolean uc); |
| 36 | } |