return (outbuf, result, inpos1, inpos2)\r
\r
# for brailleViewer\r
-def getReadingAndBraille(text, logwrite=_logwrite):\r
- return translateWithInPos2(text, logwrite=logwrite)[0:2]\r
+def getReadingAndBraille(text, logwrite=_logwrite, nabcc=False):\r
+ return translateWithInPos2(text, logwrite=logwrite, nabcc=nabcc)[0:2]\r
\r
# returns '\u2801\u2802\u2803\u2804\u2805\u2806\u2807'\r
-def japaneseToUnicodeBraille(text, logwrite=_logwrite):\r
- return translateWithInPos2(text, logwrite=logwrite)[0]\r
+def japaneseToUnicodeBraille(text, logwrite=_logwrite, nabcc=False):\r
+ return translateWithInPos2(text, logwrite=logwrite, nabcc=nabcc)[0]\r
\r
def makeOutPos(inPos, inlen, outlen):\r
# make outPos\r
# louis-compatible method\r
# tableList, typeform are not supported.\r
# mode=dotsIO is default.\r
-def translate(inbuf, cursorPos=0, logwrite=_logwrite, unicodeIO=False):\r
+def translate(inbuf, cursorPos=0, logwrite=_logwrite, unicodeIO=False, nabcc=False):\r
"""Translate a string of characters, providing position information.\r
@param inbuf: The string to translate.\r
@type inbuf: str\r
@rtype: (str, list of int, list of int, int)\r
@raise RuntimeError: If a complete translation could not be done.\r
"""\r
- sp, outbuf, inpos1, inpos2 = translateWithInPos2(inbuf, logwrite=logwrite)\r
+ sp, outbuf, inpos1, inpos2 = translateWithInPos2(inbuf, logwrite=logwrite, nabcc=nabcc)\r
if not unicodeIO:\r
pat = outbuf.replace(' ', '\u2800')\r
outbuf = ''.join([unichr((ord(c) - 0x2800) + 0x8000) for c in pat])\r