Changes in uspace/srv/fs/udf/udf_osta.c [5c702a8:b2906c0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/udf/udf_osta.c
r5c702a8 rb2906c0 51 51 #include "udf_osta.h" 52 52 #include "udf_cksum.h" 53 54 /** Calculate length of UTF-16 string55 *56 * FIXME: This is wrong! UTF-16 is not a fixed-width encoding,57 * it is a variable-width encoding (mind the surrogate58 * pairs).59 *60 */61 static size_t utf16_length(uint16_t *string) {62 size_t len = 0;63 64 while (*string++ != 0)65 len++;66 67 return len;68 }69 53 70 54 /** Illegal UNIX characters are NULL and slash. … … 296 280 ucode_chars = 297 281 udf_uncompress_unicode(len, (uint8_t *) id, raw_name, MAX_BUF); 298 ucode_chars = min(ucode_chars, utf16_ length(raw_name));282 ucode_chars = min(ucode_chars, utf16_wsize(raw_name)); 299 283 nice_uchars = 300 284 udf_translate_name(unix_name, raw_name, ucode_chars);
Note:
See TracChangeset
for help on using the changeset viewer.