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 3443298
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:46:27+00:00 2026-05-18T08:46:27+00:00

I’m building a Google Maps implementation for a Swedish company, so the language has

  • 0

I’m building a Google Maps implementation for a Swedish company, so the language has lots of uses of ä, å, and ö. I have no problems getting the special characters to display correctly (the site charset is UTF-8) except in the “title” attributes for each map marker. My code for the markers is (you can ignore everything in square brackets):

var marker = new google.maps.Marker({
    position: [coordinates],
    map: [map container div],
    icon: [icon image],
    title: "Läs mer om "+[text from JSON]  //THIS IS WHERE THE PROBLEM IS
});

When I hover over the marker on the map, the tooltip comes up as “L�s mer om…”. If I change the “ä” to ä in the Javascript, the tooltip displays “Läs mer om...” instead.

The kicker is that using special characters anywhere else in the site, either directly in raw HTML or generated text placed by CMS or what-have-you works just fine. It’s only in the Google Maps implementation that it’s cracking.

Again, given that the site is entirely in Swedish, this could be a fairly significant issue. Any bright ideas from SO resident geniuses?

  • 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-18T08:46:27+00:00Added an answer on May 18, 2026 at 8:46 am

    I had give it a try and it worked here ,

    if you need to test it so fast try
    console.log("L\u00e4s mer om") or alert("L\u00e4s mer om") it would output
    “Läs mer om “

    Source : http://www.ietf.org/rfc/rfc4627.txt

    2.5.  Strings
       The representation of strings is similar to conventions used in the C
       family of programming languages.  A string begins and ends with
       quotation marks.  All Unicode characters may be placed within the
       quotation marks except for the characters that must be escaped:
       quotation mark, reverse solidus, and the control characters (U+0000
       through U+001F).
    
       Any character may be escaped.  If the character is in the Basic
       Multilingual Plane (U+0000 through U+FFFF), then it may be
       represented as a six-character sequence: a reverse solidus, followed
       by the lowercase letter u, followed by four hexadecimal digits that
       encode the character's code point.  The hexadecimal letters A though
       F can be upper or lowercase.  So, for example, a string containing
       only a single reverse solidus character may be represented as
       "\u005C".
    
       Alternatively, there are two-character sequence escape
       representations of some popular characters.  So, for example, a
       string containing only a single reverse solidus character may be
       represented more compactly as "\\".
    
       To escape an extended character that is not in the Basic Multilingual
       Plane, the character is represented as a twelve-character sequence,
       encoding the UTF-16 surrogate pair.  So, for example, a string
       containing only the G clef character (U+1D11E) may be represented as
       "\uD834\uDD1E".
    

    explanation :

    since the marker is an JS object , so it should follow the upper listed rules

    {
        position: [coordinates],
        map: [map container div],
        icon: [icon image],
        title: "Läs mer om "+[text from JSON]  //THIS IS WHERE THE PROBLEM IS
    }
    

    okay then what to do ???
    use <?php echo json_encode("Läs mer om "); ?> or what ever your serverside language is

    and append the value to your JSON object or write it manually and Go on !!

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6

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.