Lines Matching refs:label

32 // where the last ("root") label is the empty label
35 // if there is a trailing dot for the root label.
68 IDNA::labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
72 labelToASCII(UnicodeString::fromUTF8(label), destString,
78 IDNA::labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
82 labelToUnicode(UnicodeString::fromUTF8(label), destString,
117 labelToASCII(const UnicodeString &label, UnicodeString &dest,
121 labelToUnicode(const UnicodeString &label, UnicodeString &dest,
133 labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
137 labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
173 // returns the new label length
185 checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) const;
188 isLabelOkContextJ(const UChar *label, int32_t labelLength) const;
219 UTS46::labelToASCII(const UnicodeString &label, UnicodeString &dest,
221 return process(label, TRUE, TRUE, dest, info, errorCode);
225 UTS46::labelToUnicode(const UnicodeString &label, UnicodeString &dest,
227 return process(label, TRUE, FALSE, dest, info, errorCode);
250 UTS46::labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
252 processUTF8(label, TRUE, TRUE, dest, info, errorCode);
256 UTS46::labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
258 processUTF8(label, TRUE, FALSE, dest, info, errorCode);
365 // label starts with "-"
369 // label ends with "-"
379 // Permit an empty label at the end but not elsewhere.
469 // label starts with "-"
473 // label ends with "-"
481 // Permit an empty label at the end but not elsewhere.
495 // Convert the processed ASCII prefix of the current label to UTF-16.
580 // Permit an empty label at the end (0<labelStart==labelLimit==destLength is ok)
581 // but not an empty label elsewhere nor a completely empty domain name.
665 // Replace the label in dest with the label string, if the label was modified.
666 // If &label==&dest then the label was modified in-place and labelLength
667 // is the new label length, different from label.length().
668 // If &label!=&dest then labelLength==label.length().
669 // Returns labelLength (= the new label length).
672 const UnicodeString &label, int32_t labelLength) {
673 if(&label!=&dest) {
674 dest.replace(destLabelStart, destLabelLength, label);
686 const UChar *label=dest.getBuffer()+labelStart;
690 if(labelLength>=4 && label[0]==0x78 && label[1]==0x6e && label[2]==0x2d && label[3]==0x2d) {
700 int32_t unicodeLength=u_strFromPunycode(label+4, labelLength-4,
711 unicodeLength=u_strFromPunycode(label+4, labelLength-4,
736 label=fromPunycode.getBuffer();
751 if(labelLength>=4 && label[2]==0x2d && label[3]==0x2d) {
752 // label starts with "??--"
755 if(label[0]==0x2d) {
756 // label starts with "-"
759 if(label[labelLength-1]==0x2d) {
760 // label ends with "-"
763 // If the label was not a Punycode label, then it was the result of
764 // mapping, normalization and label segmentation.
765 // If the label was in Punycode, then we mapped it again above
769 // in a non-Punycode label or U+FFFD itself in a Punycode label.
770 // We also check for dots which can come from the input to a single-label function.
772 UChar *s=(UChar *)label;
773 const UChar *limit=label+labelLength;
803 U16_NEXT_UNSAFE(label, cpLength, c);
807 label=labelString->getBuffer()+labelStart;
817 checkLabelBiDi(label, labelLength, info);
820 !isLabelOkContextJ(label, labelLength)
826 // Leave a Punycode label unchanged if it has no severe errors.
834 UChar *buffer=punycode.getBuffer(63); // 63==maximum DNS label length
843 int32_t punycodeLength=u_strToPunycode(label, labelLength,
854 punycodeLength=u_strToPunycode(label, labelLength,
869 // all-ASCII label
876 // If a Punycode label has severe errors,
886 // Make sure an ACE label does not look valid.
887 // Append U+FFFD if the label has only LDH characters.
896 const UChar *label=dest.getBuffer()+labelStart;
898 UChar *s=(UChar *)label+4; // After the initial "xn--".
899 const UChar *limit=label+labelLength;
949 // We scan the whole label and check both for whether it contains RTL characters
952 // that a domain name is a BiDi domain name (has an RTL label) only after
955 UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) const {
960 U16_NEXT_UNSAFE(label, i, c);
963 // or AL. If it has the R or AL property, it is an RTL label; if it
964 // has the L property, it is an LTR label.
975 U16_PREV_UNSAFE(label, labelLength, c);
982 // 3. In an RTL label, the end of the label must be a character with
985 // 6. In an LTR label, the end of the label must be a character with
997 U16_NEXT_UNSAFE(label, i, c);
1001 // 5. In an LTR label, only characters with the BIDI properties L, EN,
1007 // 2. In an RTL label, only characters with the BIDI properties R, AL,
1012 // 4. In an RTL label, if an EN is present, no AN may be present, and
1018 // An RTL label is a label that contains at least one character of type
1021 // label. [...]
1034 // 5. In an LTR label, only characters with the BIDI properties L, EN,
1036 // 6. In an LTR label, the end of the label must be a character with
1051 // Last character in the label is not an L or EN.
1058 // First character in the label is not an L.
1063 // Intermediate character in the label is a B, S or WS.
1083 // Last character in the label is not an L or EN.
1090 // First character in the label is not an L.
1095 // Intermediate character in the label is a B, S or WS.
1104 UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
1108 if(label[i]==0x200c) {
1120 U16_PREV_UNSAFE(label, j, c);
1131 U16_PREV_UNSAFE(label, j, c);
1143 U16_NEXT_UNSAFE(label, j, c);
1153 } else if(label[i]==0x200d) {
1163 U16_PREV_UNSAFE(label, j, c);
1189 checkArgs(const void *label, int32_t length,
1200 if( (label==NULL ? length!=0 : length<-1) ||
1202 (dest==label && label!=NULL)
1220 const UChar *label, int32_t length,
1223 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1226 UnicodeString src((UBool)(length<0), label, length);
1236 const UChar *label, int32_t length,
1239 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1242 UnicodeString src((UBool)(length<0), label, length);
1284 const char *label, int32_t length,
1287 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1290 StringPiece src(label, length<0 ? uprv_strlen(label) : length);
1300 const char *label, int32_t length,
1303 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1306 StringPiece src(label, length<0 ? uprv_strlen(label) : length);