Lines Matching refs:nUtf32
50 inline bool isDigit(sal_uInt32 nUtf32) in isDigit() argument
52 return nUtf32 >= 0x30 && nUtf32 <= 0x39; // '0'--'9' in isDigit()
55 inline bool isAlpha(sal_uInt32 nUtf32) in isAlpha() argument
59 (nUtf32 >= 0x41 && nUtf32 <= 0x5A) || in isAlpha()
60 (nUtf32 >= 0x61 && nUtf32 <= 0x7A) in isAlpha()
79 inline int getHexWeight(sal_uInt32 nUtf32) in getHexWeight() argument
81 return nUtf32 >= 0x30 && nUtf32 <= 0x39 ? // '0'--'9' in getHexWeight()
82 static_cast< int >(nUtf32 - 0x30) : in getHexWeight()
83 nUtf32 >= 0x41 && nUtf32 <= 0x46 ? // 'A'--'F' in getHexWeight()
84 static_cast< int >(nUtf32 - 0x41 + 10) : in getHexWeight()
85 nUtf32 >= 0x61 && nUtf32 <= 0x66 ? // 'a'--'f' in getHexWeight()
86 static_cast< int >(nUtf32 - 0x61 + 10) : in getHexWeight()
90 inline bool isValid(sal_Bool const * pCharClass, sal_uInt32 nUtf32) in isValid() argument
92 return nUtf32 < nCharClassSize && pCharClass[nUtf32]; in isValid()
252 void writeUcs4(rtl_uString ** pBuffer, sal_Int32 * pCapacity, sal_uInt32 nUtf32) in writeUcs4() argument
254 OSL_ENSURE(nUtf32 <= 0x10FFFF, "bad UTF-32 char"); in writeUcs4()
255 if (nUtf32 <= 0xFFFF) { in writeUcs4()
257 pBuffer, pCapacity, static_cast< sal_Unicode >(nUtf32)); in writeUcs4()
259 nUtf32 -= 0x10000; in writeUcs4()
262 static_cast< sal_Unicode >(nUtf32 >> 10 | 0xD800)); in writeUcs4()
265 static_cast< sal_Unicode >((nUtf32 & 0x3FF) | 0xDC00)); in writeUcs4()
284 sal_uInt32 nUtf32, rtl_TextEncoding eCharset, bool bStrict) in writeEscapeChar() argument
286 OSL_ENSURE(nUtf32 <= 0x10FFFF, "bad UTF-32 char"); in writeEscapeChar()
288 if (nUtf32 < 0x80) in writeEscapeChar()
289 writeEscapeOctet(pBuffer, pCapacity, nUtf32); in writeEscapeChar()
290 else if (nUtf32 < 0x800) in writeEscapeChar()
292 writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 6 | 0xC0); in writeEscapeChar()
293 writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80); in writeEscapeChar()
295 else if (nUtf32 < 0x10000) in writeEscapeChar()
297 writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 12 | 0xE0); in writeEscapeChar()
298 writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 6 & 0x3F) | 0x80); in writeEscapeChar()
299 writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80); in writeEscapeChar()
303 writeEscapeOctet(pBuffer, pCapacity, nUtf32 >> 18 | 0xF0); in writeEscapeChar()
304 writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 12 & 0x3F) | 0x80); in writeEscapeChar()
305 writeEscapeOctet(pBuffer, pCapacity, (nUtf32 >> 6 & 0x3F) | 0x80); in writeEscapeChar()
306 writeEscapeOctet(pBuffer, pCapacity, (nUtf32 & 0x3F) | 0x80); in writeEscapeChar()
313 if (nUtf32 <= 0xFFFF) in writeEscapeChar()
315 aSrc[0] = static_cast< sal_Unicode >(nUtf32); in writeEscapeChar()
321 ((nUtf32 - 0x10000) >> 10) | 0xD800); in writeEscapeChar()
323 ((nUtf32 - 0x10000) & 0x3FF) | 0xDC00); in writeEscapeChar()
347 writeUcs4(pBuffer, pCapacity, nUtf32); in writeEscapeChar()
610 sal_uInt32 nUtf32 = readUcs4( in rtl_uriEncode() local
619 if (isValid(pCharClass, nUtf32)) // implies nUtf32 <= 0x7F in rtl_uriEncode()
621 static_cast< sal_Unicode >(nUtf32)); in rtl_uriEncode()
623 pResult, &nCapacity, nUtf32, eCharset, in rtl_uriEncode()
634 && isValid(pCharClass, nUtf32)) // implies nUtf32 <= 0x7F in rtl_uriEncode()
636 static_cast< sal_Unicode >(nUtf32)); in rtl_uriEncode()
638 pResult, &nCapacity, nUtf32, eCharset, in rtl_uriEncode()
648 writeEscapeOctet(pResult, &nCapacity, nUtf32); in rtl_uriEncode()
676 sal_uInt32 nUtf32 = readUcs4(&p, pEnd, true, eCharset, &eType); in rtl_uriDecode() local
680 if (nUtf32 <= 0x7F && eMechanism == rtl_UriDecodeToIuri) in rtl_uriDecode()
682 writeEscapeOctet(pResult, &nCapacity, nUtf32); in rtl_uriDecode()
686 writeUcs4(pResult, &nCapacity, nUtf32); in rtl_uriDecode()
694 writeEscapeOctet(pResult, &nCapacity, nUtf32); in rtl_uriDecode()