ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/PrepareString.java [129:221]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        catch ( ArrayIndexOutOfBoundsException aioobe )
        {
            // There 
        }

        char[] source = unicode.toCharArray();

        // Create a target char array which is 3 times bigger than the original size. 
        // We have to do that because the map phase may transform a char to
        // three chars.
        // TODO : we have to find a way to prevent this waste of space.
        char[] target = new char[unicode.length() * 3 + 2];

        int limit = 0;

        for ( char c : source )
        {
            switch ( c )
            {
                case 0x0000:
                case 0x0001:
                case 0x0002:
                case 0x0003:
                case 0x0004:
                case 0x0005:
                case 0x0006:
                case 0x0007:
                case 0x0008:
                    // All other control code (e.g., Cc) points or code points with a
                    // control function (e.g., Cf) are mapped to nothing.  The following is
                    // a complete list of these code points: U+0000-0008...
                    break;

                case 0x0009:
                case 0x000A:
                case 0x000B:
                case 0x000C:
                case 0x000D:
                    // CHARACTER TABULATION (U+0009), LINE FEED (LF) (U+000A), LINE
                    // TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
                    // (U+000D), ... are mapped to SPACE (U+0020).
                    target[limit++] = 0x0020;
                    break;

                case 0x000E:
                case 0x000F:
                case 0x0010:
                case 0x0011:
                case 0x0012:
                case 0x0013:
                case 0x0014:
                case 0x0015:
                case 0x0016:
                case 0x0017:
                case 0x0018:
                case 0x0019:
                case 0x001A:
                case 0x001B:
                case 0x001C:
                case 0x001D:
                case 0x001E:
                case 0x001F:
                    // All other control code (e.g., Cc) points or code points with a
                    // control function (e.g., Cf) are mapped to nothing.  The following is
                    // a complete list of these code points: ... U+000E-001F...
                    break;

                case 0x0041:
                case 0x0042:
                case 0x0043:
                case 0x0044:
                case 0x0045:
                case 0x0046:
                case 0x0047:
                case 0x0048:
                case 0x0049:
                case 0x004A:
                case 0x004B:
                case 0x004C:
                case 0x004D:
                case 0x004E:
                case 0x004F:
                case 0x0050:
                case 0x0051:
                case 0x0052:
                case 0x0053:
                case 0x0054:
                case 0x0055:
                case 0x0056:
                case 0x0057:
                case 0x0058:
                case 0x0059:
                case 0x005A:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/PrepareString.java [4594:4686]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        catch ( ArrayIndexOutOfBoundsException aioobe )
        {
            // There 
        }

        char[] source = unicode.toCharArray();
        
        // Create a target char array which is 3 times bigger than the original size. 
        // We have to do that because the map phase may transform a char to
        // three chars.
        // TODO : we have to find a way to prevent this waste of space.
        char[] target = new char[unicode.length() * 3 + 2];
    
        int limit = 0;
    
        for ( char c : source )
        {
            switch ( c )
            {
                case 0x0000:
                case 0x0001:
                case 0x0002:
                case 0x0003:
                case 0x0004:
                case 0x0005:
                case 0x0006:
                case 0x0007:
                case 0x0008:
                    // All other control code (e.g., Cc) points or code points with a
                    // control function (e.g., Cf) are mapped to nothing.  The following is
                    // a complete list of these code points: U+0000-0008...
                    break;
    
                case 0x0009:
                case 0x000A:
                case 0x000B:
                case 0x000C:
                case 0x000D:
                    // CHARACTER TABULATION (U+0009), LINE FEED (LF) (U+000A), LINE
                    // TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
                    // (U+000D), ... are mapped to SPACE (U+0020).
                    target[limit++] = 0x0020;
                    break;
    
                case 0x000E:
                case 0x000F:
                case 0x0010:
                case 0x0011:
                case 0x0012:
                case 0x0013:
                case 0x0014:
                case 0x0015:
                case 0x0016:
                case 0x0017:
                case 0x0018:
                case 0x0019:
                case 0x001A:
                case 0x001B:
                case 0x001C:
                case 0x001D:
                case 0x001E:
                case 0x001F:
                    // All other control code (e.g., Cc) points or code points with a
                    // control function (e.g., Cf) are mapped to nothing.  The following is
                    // a complete list of these code points: ... U+000E-001F...
                    break;
    
                case 0x0041:
                case 0x0042:
                case 0x0043:
                case 0x0044:
                case 0x0045:
                case 0x0046:
                case 0x0047:
                case 0x0048:
                case 0x0049:
                case 0x004A:
                case 0x004B:
                case 0x004C:
                case 0x004D:
                case 0x004E:
                case 0x004F:
                case 0x0050:
                case 0x0051:
                case 0x0052:
                case 0x0053:
                case 0x0054:
                case 0x0055:
                case 0x0056:
                case 0x0057:
                case 0x0058:
                case 0x0059:
                case 0x005A:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



