def _quote_str(self, s):
    "Escape all unicode characters to there unicode code points in form of \\uxxxx.\n        The returned string is a pure ascii string.\n        Normal ascii characters like \\n or \\t won't be escaped.\n\n        note: wxGlade don't handles file encoding well currently. Thereby\n              we escape all unicode characters.\n\n        note: The string 's' is encoded with self.app_encoding already.\n\n        see: BaseLangCodeWriter._quote_str for additional details\n        see: _recode_x80_xff()"
    s = s.replace('$', '\\$')
    s = s.replace('@', '\\@')
    if (not isinstance(s, compat.unicode)):
        s = s.decode(self.app_encoding)
    try:
        dummy = s.encode('ascii')
        if self._use_gettext:
            return ('_T("%s")' % s)
        else:
            return ('"%s"' % s)
    except UnicodeError:
        pass
    s = s.encode('raw-unicode-escape')
    s = self._recode_x80_xff(s)
    if compat.PYTHON3:
        s = s.decode('ASCII')
    s = re.sub('\\\\u([0-9a-f]{4})', '\\\\N{U+\\1}', s)
    if self._use_gettext:
        return ('_T("%s")' % s)
    else:
        return ('"%s"' % s)
Escape all unicode characters to there unicode code points in form of \uxxxx.
The returned string is a pure ascii string.
Normal ascii characters like \n or \t won't be escaped.

note: wxGlade don't handles file encoding well currently. Thereby
      we escape all unicode characters.

note: The string 's' is encoded with self.app_encoding already.

see: BaseLangCodeWriter._quote_str for additional details
see: _recode_x80_xff()
def _quote_str(self, s):
    "Escape all unicode characters to there unicode code points in form of \\uxxxx.\n        The returned string is a pure ascii string.\n        Normal ascii characters like \\n or \\t won't be escaped.\n\n        note: wxGlade don't handles file encoding well currently. Thereby\n              we escape all unicode characters.\n\n        note: The string 's' is encoded with self.app_encoding already.\n\n        see: BaseLangCodeWriter._quote_str for additional details\n        see: _recode_x80_xff()"
    s = s.replace('$', '\\$')
    s = s.replace('@', '\\@')
    if (not isinstance(s, compat.unicode)):
        s = s.decode(self.app_encoding)
    try:
        dummy = s.encode('ascii')
        if self._use_gettext:
            return ('_T("%s")' % s)
        else:
            return ('"%s"' % s)
    except UnicodeError:
        pass
    s = s.encode('raw-unicode-escape')
    s = self._recode_x80_xff(s)
    if compat.PYTHON3:
        s = s.decode('ASCII')
    s = re.sub('\\\\u([0-9a-f]{4})', '\\\\N{U+\\1}', s)
    if self._use_gettext:
        return ('_T("%s")' % s)
    else:
        return ('"%s"' % s)