| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | */ |
| | | package com.sun.opends.sdk.util; |
| | | |
| | |
| | | |
| | | import static com.sun.opends.sdk.util.Validator.ensureNotNull; |
| | | |
| | | import java.text.Normalizer; |
| | | import java.text.Normalizer.Form; |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | |
| | |
| | | // Map the attribute value. |
| | | map(buffer, sequence.subSequence(i, length), trim, foldCase); |
| | | // Normalize the attribute value. |
| | | normalize(buffer); |
| | | String normalizedForm = Normalizer.normalize(buffer, Form.NFKD); |
| | | buffer.setLength(0); |
| | | buffer.append(normalizedForm); |
| | | break; |
| | | } |
| | | int buffLen = buffer.length(); |
| | |
| | | |
| | | |
| | | |
| | | // Normalizes the input string with NFKC Form. |
| | | private static void normalize(final StringBuilder buffer) |
| | | { |
| | | Platform.normalize(buffer); |
| | | } |
| | | |
| | | |
| | | |
| | | // Prevent instantiation. |
| | | private StringPrepProfile() |
| | | { |