(final String s)
| 42 | } |
| 43 | |
| 44 | public static String convCp1251ToUnicode(final String s){ |
| 45 | if (s==null) return null; |
| 46 | StringBuffer b=new StringBuffer(s.length()); |
| 47 | for (int i=0;i<s.length();i++){ |
| 48 | char ch=s.charAt(i); |
| 49 | if (ch>0xbf) ch+=0x410-0xc0; |
| 50 | if (ch==0xa8) ch=0x401; |
| 51 | if (ch==0xb8) ch=0x451; |
| 52 | b.append(ch); |
| 53 | //setCharAt(i, ch); |
| 54 | } |
| 55 | return b.toString(); |
| 56 | } |
| 57 | |
| 58 | public static String convUnicodeToCp1251(final String s){ |
| 59 | if (s==null) return null; |
no test coverage detected