Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7061205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:26:44+00:00 2026-05-28T04:26:44+00:00

I have some link resources with none latin characters like åäö These are usually

  • 0

I have some link resources with none latin characters like åäö
These are usually user uploaded files

The problem is that i am not successfull in encoding them

using filename.encodeAsURL seems to not encode it the right way

For example the character ö is turned into o%CC%88
Testing to type the same thing in firefox and copy the contents gives %C3%B6

What are the difference between these encodings and what should i use to get the correct encoding??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:26:44+00:00Added an answer on May 28, 2026 at 4:26 am

    Both encodings are correct. You are actually seeing the encoding of two different strings.

    The key here is noticing the o at the beginning of the string:

    o%CC%88 is the letter o followed by Unicode Character Combining Diaeresis, which combines with the previous character when rendered.

    %C3%B6 is Unicode Character Latin Small O With Diaeresis.

    What you are seeing is that in the first case, the string entered is something like these two characters: o ¨, which are actually rendered as ö.
    In the second case, it’s the actual character ö.

    My guess is you are seeing the difference between two different inputs.


    Update based on below discussion: If you are dynamically processing Unicode characters, and you do not have control over the input methods, you can try to normalize the Unicode, using java.text.Normalizer (Java 1.6 or newer).

    Normalizing attempts to ensure that all characters are consistently represented, so that accented characters are always represented by a combined character or always by the character+combining mark.

    Rough example:

    String.metaClass.normalizeUnicode = {
        return java.text.Normalizer.normalize(delegate, java.text.Normalizer.Form.NFC)
    }
    
    input = input.normalizeUnicode()
    

    There are four forms of normalization. I picked the one that seems to be best for your case based on the description of how they work, but you may prefer to try the other ones and see what works most consistently.


    All that being said, if you are try to representing Unicode characters in a URL, and they are not being loaded and processed by the code directly, it’s probably best to avoid using non-latin characters altogether. Not only does this have the benefit of consistently, but also significantly shorter and more legible URLs. boo.pdf is a lot easier to read than bo%CC%88o.pdf.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xhtml page where I do include some css files like: <link
I have some jQuery code that highlights a link when clicked, and changes the
I have some code right now that executes when a link is clicked. The
I have third party sites that link to some images on my site. The
I have some basic user navigation that only needs to be displayed if a
In my application I have some link buttons there but when I right click
I have some internal link which shows different content. Everytime I click the internal
I have some textboxes on a page and I want to click a link
I have a link to some style sheet from the Yahoo Developer Network, this
I have a script which collects an image, link and some text content from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.