On Wed, Mar 9, 2016 at 5:38 PM, Christopher Schultz < ch...@christopherschultz.net> wrote:
> Yuval, > > On 3/8/16 4:04 PM, Yuval Schwartz wrote: > > @WebServlet(name="SomeServlet", urlPatterns={"/help/why-no-work", > > "/iw/help/למה-לא-עובד", > > "/iw/help/%D7%9C%D7%9E%D7%94-%D7%9C%D7%90-%D7%A2%D7%95%D7%91%D7%93"} > > (the last pattern is the same as the second to last, just encoded) > > I think that last pattern will not be useful, because Tomcat should be > doing the encoding internally. For example, if you wanted to map a > servlet to "/foo bar" you wouldn't have to URL-encode it like /foo%20bar > in the XML file. But I haven't actually tried it. > > (from your other post): > > On 3/8/16 5:35 PM, Yuval Schwartz wrote: > > I did this and it worked: > > The english patterns show up fine, as expected. > > The hebrew pattern shows up as a bunch of question marks (eg: > > ????-?????-????) > > The URLEncoded pattern shows up as wierd symbols (eg: diamond shape, > > tm symbol). > > Hmm, that could certainly be a problem with the tool itself (Netbeans?). > Can you try running with jconsole just to have a (potentially) clean > environment? > Hey, can you clarify a bit? What do you mean "try running with jconsole"? Run what? As I understand it, JConsole is for monitoring. > > The encoded pattern showing up as weird symbols sounds .. odd as well. > Actually, everything about this sounds weird. > > On 3/9/16 4:38 AM, Yuval Schwartz wrote: > > Are you suggesting I convert all of my source files to UTF-8? Will > > all new files that are created now be in UTF-8 at least? Because I > > just created a new servlet for testing purposes (after the > > -J-Dfile.encoding property was added) and hebrew urls still aren't > > found. > > You definitely don't need to convert your files to UTF-8, but you might > instead want to use the encoding-proof Unicode escapes instead of the > raw Hebrew in your source files. > > You can use native2ascii to do this for you: > > input.txt > /iw/help/למה-לא-עובד > > $ native2ascii -encoding utf8 input.txt > /iw/help/\u05dc\u05de\u05d4-\u05dc\u05d0-\u05e2\u05d5\u05d1\u05d3 > > So those are the \u Unicode escapes that you should use in your code. > Try using those and rebuilding to see if it improves anything. > This doesn't work. > > -chris > Thank you > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >