Comparison

util-src/encodings.c @ 4271:18d888c8c12d

util.encodings: Fix idna.to_unicode
author Paul Aurich <paul@darkrain42.org>
date Sun, 22 May 2011 15:26:03 -0700
parent 3965:4ae4b2c0e99d
child 4272:0a4ce2086a88
comparison
equal deleted inserted replaced
4270:d2d47fde9811 4271:18d888c8c12d
313 static int Lidna_to_unicode(lua_State *L) /** idna.to_unicode(s) */ 313 static int Lidna_to_unicode(lua_State *L) /** idna.to_unicode(s) */
314 { 314 {
315 size_t len; 315 size_t len;
316 int32_t ulen, dest_len, output_len; 316 int32_t ulen, dest_len, output_len;
317 const char *s = luaL_checklstring(L, 1, &len); 317 const char *s = luaL_checklstring(L, 1, &len);
318 UChar* ustr; 318 UChar ustr[1024];
319 UErrorCode err = U_ZERO_ERROR; 319 UErrorCode err = U_ZERO_ERROR;
320 UChar dest[1024]; 320 UChar dest[1024];
321 char output[1024]; 321 char output[1024];
322 322
323 u_strFromUTF8(ustr, 1024, &ulen, s, len, &err); 323 u_strFromUTF8(ustr, 1024, &ulen, s, len, &err);