Bug #153 » aqbanking_5.99.43beta.diff
src/libs/plugins/parsers/swift/swift940.c | ||
---|---|---|
c=(unsigned char)(*(p++));
|
||
if (c<32 || c==127)
|
||
c=32;
|
||
if (c & 0x80) {
|
||
GWEN_Buffer_AppendByte(buf, 0xc0 | c>>6);
|
||
c &= ~0x40;
|
||
else {
|
||
/* Dirty hack to support Unicode code points */
|
||
/* U+00A0..U+00FF already in UTF-8 encoding. */
|
||
/* E.g. German Umlaute from Consorsbank */
|
||
unsigned int c2 = (unsigned char)(*p);
|
||
if ((c & ~0x01)==0xC2 && (c2 & ~0x3F)==0x80) {
|
||
GWEN_Buffer_AppendByte(buf, c);
|
||
c=(unsigned char)(*(p++));
|
||
}
|
||
else if (c & 0x80) {
|
||
GWEN_Buffer_AppendByte(buf, 0xc0 | c>>6);
|
||
c &= ~0x40;
|
||
}
|
||
}
|
||
GWEN_Buffer_AppendByte(buf, c);
|
||
if (size!=-1)
|