EncodePackage encodes a package/namespace string using Java-compatible encodings. Java uses: UTF_8, ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL for packages.
(input string)
| 164 | // EncodePackage encodes a package/namespace string using Java-compatible encodings. |
| 165 | // Java uses: UTF_8, ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL for packages. |
| 166 | func (e *Encoder) EncodePackage(input string) (MetaString, error) { |
| 167 | // Java pkgEncodings = {UTF_8, ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL} |
| 168 | pkgEncodings := []Encoding{ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL, UTF_8} |
| 169 | encoding := e.ComputeEncodingWith(input, pkgEncodings) |
| 170 | return e.EncodeWithEncoding(input, encoding) |
| 171 | } |
| 172 | |
| 173 | // EncodeTypeName encodes a typename string using Java-compatible encodings. |
| 174 | // Java uses: UTF_8, ALL_TO_LOWER_SPECIAL, LOWER_UPPER_DIGIT_SPECIAL, FIRST_TO_LOWER_SPECIAL for typenames. |
no test coverage detected