sabi0 commented on code in PR #12973: URL: https://github.com/apache/lucene/pull/12973#discussion_r1444504974
########## lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java: ########## @@ -184,7 +186,7 @@ public CharSequence escape(CharSequence text, Locale locale, Type type) { * Returns a String where the escape char has been removed, or kept only once if there was a * double escape. * - * <p>Supports escaped unicode characters, e. g. translates <code>A</code> to <code>A</code>. + * <p>Supports escaped Unicode characters, e.g. translates <code>A</code> to <code>A</code>. Review Comment: Thank you for the link. I did not know about the `\uu...` either. Unfortunately, javadoc seems to swallow all of those 'u's anyway: ``` <div class="block">Returns a String where the escape char has been removed, or kept only once if there was a double escape. <p>Supports escaped Unicode characters, e.g. translates <code>A</code> to <code>A</code>.</div> ``` The `{@code ...}` markup works the same: ``` <code>\u0041</code> => A <code>\uu0041</code> => A <code>\\u0041</code> => \\u0041 {@code \u0041} => A {@code \uu0041} => A {@code \\u0041} => \\u0041 ``` JDK Javadoc uses Unicode escape for the backslash itself: `{@code \u005Cu0800}`: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/io/DataInput.java#L116 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org