1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
dmiller
88146749f6 Add unittest.testing() to make test building conditional 2014-03-06 17:15:05 +00:00
dmiller
9697b6673c Add CP437 (native Windows OEM) to unicode.lua 2014-03-06 17:14:57 +00:00
dmiller
153e5f2124 unicode.lua: Add some UTF-8 decoding error checking 2014-03-06 17:14:56 +00:00
dmiller
a962973c06 Fix unicode module declaration (copy-paste error) 2014-03-06 17:14:54 +00:00
dmiller
f17cc56bf9 New utility functions for transcoding to and from Windows Unicode
Windows uses UTF-16 little-endian. Since this is a common use case,
utility functions are provided such that this:

    x = unicode.utf16to8(v)

is equivalent to this:

    x = unicode.encode(unicode.decode(v, unicode.utf16_dec),
    unicode.utf8_enc)

but faster (fewer intermediate tables)
2014-02-19 18:32:23 +00:00
dmiller
a76990b9ae Fix off-by-one error in unicode.decode.
Would fail to decode the last character in a string.
2014-02-19 18:32:21 +00:00
dmiller
1273cb4200 New unicode.lua library. Supports utf-8 and UTF-16 2014-02-19 17:08:30 +00:00