@Test(groups = { "datacoding" }) public void testCedilla() throws Exception { Charset ucs2Charset = Charset.forName("UTF-16BE"); Charset utf8Charset = Charset.forName("UTF-8"); byte[] textPart0 = new byte[] { 0, (byte) 0xE7 }; String msg0 = new String(textPart0, ucs2Charset); byte[] testPart0Utf8 = msg0.getBytes(utf8Charset); byte[] textPart = new byte[] { 0x74, 0x65, 0x73, 0x74, 0x73, 0x65, 0x6e, 0x64, 0x20, (byte) 0xc3, (byte) 0x87 }; String msg = new String(textPart, utf8Charset); String s1 = "testsend Ç"; String s2 = "Ç"; int i2 = msg.charAt(9); GSMCharset gsm7Charset = new GSMCharset("GSM", new String[] {}); Charset cSet = gsm7Charset; GSMCharsetEncoder encoder = (GSMCharsetEncoder) cSet.newEncoder(); ByteBuffer bb = null; try { bb = encoder.encode(CharBuffer.wrap(msg)); } catch (Exception e) { } byte[] encodedData = new byte[bb.limit()]; bb.get(encodedData); }
@Override public CharsetEncoder newEncoder() { return new GSMCharsetEncoder(this, averageBytesPerChar, maxBytesPerChar); }
GSMCharset extends Charset { @Override public CharsetEncoder newEncoder() { return new GSMCharsetEncoder(this, averageBytesPerChar, maxBytesPerChar); } }
GSMCharset extends Charset { @Override public CharsetEncoder newEncoder() { return new GSMCharsetEncoder(this, averageBytesPerChar, maxBytesPerChar); } GSMCharset(String canonicalName, String[] aliases);  GSMCharset(String canonicalName, String[] aliases, int[] mainTable, int[] extentionTable);  GSMCharset(String canonicalName, String[] aliases,
            NationalLanguageIdentifier nationalLanguageLockingShiftIdentifier,
            NationalLanguageIdentifier nationalLanguageSingleShiftIdentifier); }
GSMCharset extends Charset { @Override public CharsetEncoder newEncoder() { return new GSMCharsetEncoder(this, averageBytesPerChar, maxBytesPerChar); } GSMCharset(String canonicalName, String[] aliases);  GSMCharset(String canonicalName, String[] aliases, int[] mainTable, int[] extentionTable);  GSMCharset(String canonicalName, String[] aliases,
            NationalLanguageIdentifier nationalLanguageLockingShiftIdentifier,
            NationalLanguageIdentifier nationalLanguageSingleShiftIdentifier); @Override boolean contains(Charset cs); @Override CharsetDecoder newDecoder(); @Override CharsetEncoder newEncoder(); boolean checkAllCharsCanBeEncoded(String data); static boolean checkAllCharsCanBeEncoded(String data, int[] mainTable, int[] extentionTable); int checkEncodedDataLengthInChars(String data); static int checkEncodedDataLengthInChars(String data, int[] mainTable, int[] extentionTable); static int septetsToOctets(int septCnt); static int octetsToSeptets(int byteCnt); String[] sliceString(String data, int charCount); static String[] sliceString(String data, int charCount, int[] mainTable, int[] extentionTable); }
GSMCharset extends Charset { @Override public CharsetEncoder newEncoder() { return new GSMCharsetEncoder(this, averageBytesPerChar, maxBytesPerChar); } GSMCharset(String canonicalName, String[] aliases);  GSMCharset(String canonicalName, String[] aliases, int[] mainTable, int[] extentionTable);  GSMCharset(String canonicalName, String[] aliases,
            NationalLanguageIdentifier nationalLanguageLockingShiftIdentifier,
            NationalLanguageIdentifier nationalLanguageSingleShiftIdentifier); @Override boolean contains(Charset cs); @Override CharsetDecoder newDecoder(); @Override CharsetEncoder newEncoder(); boolean checkAllCharsCanBeEncoded(String data); static boolean checkAllCharsCanBeEncoded(String data, int[] mainTable, int[] extentionTable); int checkEncodedDataLengthInChars(String data); static int checkEncodedDataLengthInChars(String data, int[] mainTable, int[] extentionTable); static int septetsToOctets(int septCnt); static int octetsToSeptets(int byteCnt); String[] sliceString(String data, int charCount); static String[] sliceString(String data, int charCount, int[] mainTable, int[] extentionTable); static final String GSM_CANONICAL_NAME; static final byte ESCAPE; static final int[] basicMap; static final int[] basicExtentionMap; static Charset gsm7CharsetDefault; static final int[] spanishExtentionMap; static Charset gsm7CharsetSpanish; static final int[] portugeseMap; static final int[] portugeseExtentionMap; static Charset gsm7CharsetPortugese; static final int[] turkishMap; static final int[] turkishExtentionMap; static Charset gsm7CharsetTurkish; static final int[] urduMap; static final int[] urduExtentionMap; static Charset gsm7CharsetUrdu; static final int[] hindiMap; static final int[] hindiExtentionMap; static Charset gsm7CharsetHindi; static final int[] bengaliMap; static final int[] bengaliExtentionMap; static Charset gsm7CharsetBengali; static final int[] punjabiMap; static final int[] punjabiExtentionMap; static Charset gsm7CharsetPunjabi; static final int[] gujaratiMap; static final int[] gujaratiExtentionMap; static Charset gsm7CharsetGujarati; static final int[] oriyaMap; static final int[] oriyaExtentionMap; static Charset gsm7CharsetOriya; static final int[] tamilMap; static final int[] tamilExtentionMap; static Charset gsm7CharsetTamil; static final int[] teluguMap; static final int[] teluguExtentionMap; static Charset gsm7CharsetTelugu; static final int[] kannadaMap; static final int[] kannadaExtentionMap; static Charset gsm7CharsetKannada; static final int[] malayalamMap; static final int[] malayalamExtentionMap; static Charset gsm7CharsetMalayalam; }