Roberto Ierusalimschy
39bb3cf242
Name 'nonstrict' in the UTF-8 library changed to 'lax'
It is not a good idea to use negative words to describe boolean
values. (When we negate that boolean we create a double negative...)
6 years ago
Roberto Ierusalimschy
1e0c73d5b6
Changes in the validation of UTF-8
All UTF-8 encoding functionality (including the escape
sequence '\u') accepts all values from the original UTF-8
specification (with sequences of up to six bytes).
By default, the decoding functions in the UTF-8 library do not
accept invalid Unicode code points, such as surrogates. A new
parameter 'nonstrict' makes them accept all code points up to
(2^31)-1, as in the original UTF-8 specification.
6 years ago
Roberto Ierusalimschy
fb18346ddd
Avoid using 'int' for UTF-8 values
An 'int' may have only 16 bits, so it may not be big enough for UTF-8
values. The new type 'utfint' (in the utf8 library) ensures at least
21 bits for those values.
6 years ago
Roberto Ierusalimschy
1a1b2f3d7f
added 'return' to calls to 'luaL_error' (to signal to the compiler
that the function cannot continue past that call)
8 years ago
Roberto Ierusalimschy
2a235312f0
detail (removing spaces at end of lines)
8 years ago
Roberto Ierusalimschy
f2a813ae10
details (avoid some 'lint' warnings)
10 years ago
Roberto Ierusalimschy
297512b34c
avoid using 'lua_pushliteral' in a non-zero-terminated string
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
745618d941
'charpatt' -> 'charpattern'
10 years ago
Roberto Ierusalimschy
34b6664dcb
better to use 'long' to represent UTF-8 code points
10 years ago
Roberto Ierusalimschy
f14662fca6
detail (added placeholders for non-function fields to preallocate
space for them)
10 years ago
Roberto Ierusalimschy
e58ef8d0bb
missing macro 'LUAMOD_API' in function to open library
11 years ago
Roberto Ierusalimschy
e1daf10e4c
details in comments
11 years ago
Roberto Ierusalimschy
144afa4d47
several changes in 'utf8.offset'
11 years ago
Roberto Ierusalimschy
3a044de5a1
new implementation for 'utf8.len'
11 years ago
Roberto Ierusalimschy
607be77ec8
some details to avoid warnings
11 years ago
Roberto Ierusalimschy
738b3b64af
detail (to avoid warnings with '-O3')
11 years ago
Roberto Ierusalimschy
7707f3e7c3
'posrelat' -> 'u_posrelat' (to avoid name conflict in 'one.c')
11 years ago
Roberto Ierusalimschy
68df7c6279
added proper headers for a standard lib file
11 years ago
Roberto Ierusalimschy
6ccf150039
new library: utf8
11 years ago