1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
dmiller
58aa610671 Use a generic transcode function to implement utf16to8 etc. 2014-03-13 21:43:09 +00:00
dmiller
17c3e9755e NSEdoc cleanup.
1. The first paragraph of a function's NSEdoc is used as a short
summary. Some of these were very long, so I split off a shorter summary.

2. Use asterisks (*) to denote bulletted lists, not 'o'

3. Wrap lines at 80 columns

4. a couple other spelling and formatting fixes
2014-03-10 19:01:19 +00:00
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