X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fiso6937.cc;h=8409f9b00eabdfcfba37ee6246ccb542ef3801e3;hb=1e8f0e6e3964225e09e7fcad78a92659ce719a27;hp=2b75116b65a6a6bb86be47e700f1b64fe7b40ab4;hpb=5ad33b463f977a286f69fd1c87c0db8cc8ac9e56;p=libsub.git diff --git a/src/iso6937.cc b/src/iso6937.cc index 2b75116..8409f9b 100644 --- a/src/iso6937.cc +++ b/src/iso6937.cc @@ -98,6 +98,24 @@ sub::utf16_to_iso6937 (wstring s) } } } + + if (s[i] == 0x201e) { + /* ISO6397 does not support German (lower) quotation mark (UTF 0x201e) so use + a normal opening one (0x201c, which is 170 in ISO6937). + */ + o += (char) 170; + } else if (s[i] == 0x2013 || s[i] == 0x2014) { + /* ISO6397 does not support en- or em-dashes, so use a horizontal bar (0x2015, + which is 208 in ISO6937). + */ + o += (char) 208; + } else if (s[i] == 0x2010 || s[i] == 0x2011 || s[i] == 0x2012) { + /* Similar story with hyphen, non-breaking hyphen, figure dash */ + o += '-'; + } else if (s[i] == 0x2032) { + /* And prime */ + o += '\''; + } } return o;