Custom China map the Chinese name is error code

Hi guys,

I added a custom China map into the version 0.43.2 (run the Metabase with Chromium, also the GeoJSON is UTF-8 format), however the Chinese name is error code.

Below is Chromium’s information (name is error code and the name is Chinese):
image

Thanks.

Hi @Sunny123

This is a continuation of https://github.com/metabase/metabase/issues/11924

Are you using a reverse proxy? Or could the web server hosting the GeoJSON be changing the encoding?
Check the headers of the request and response.

Hi Flamber,

Thanking fro you reply. But it doesn’t work.

There is no reverse proxy used in my local laptop IIS server. (this is a new local IIS server created in the windows)

The default encoded of web-config file:
<system.web>

</system.web>

Hi Flamber,

Thanking fro you reply. But it doesn’t work.

There is no reverse proxy used in my local laptop IIS server. (this is a new local IIS server created in the windows)

The default encoded of web-config file:
<system.web>

</system.web>

@flamber

@Sunny123

I don’t understand. Are you running Metabase on http://localhost:3000 and then the map is setup (Admin > Settings > Maps) to something like http://localhost:80/maps/china.json (or whatever the port and path is on IIS) ?

Post the request+response headers from the browsers Network-tab, when it’s trying to get the map.

@Sunny123
Check the headers by accessing the file directly - http://127.0.0.1/maps/21.json
Or try using the direct Github raw URL instead in the Admin > Settings > Maps - https://raw.githubusercontent.com/longwosion/geojson-map-china/master/china.json

Again, I cannot reproduce your problem, so it’s something with your setup that is causing the problem.
Or try another browser (i.e. Firefox) - maybe it’s something with that?

Hi guys,

I cann’t access the URL:https://raw.githubusercontent.com/longwosion/geojson-map-china/master/china.json

Can U test this json? (I used this json at the first time, later, I changed the json from your side):
https://geo.datav.aliyun.com/areas/bound/100000_full.json

@Sunny123

  1. Check the headers by accessing the GeoJSON directly (the URL that you input in Admin > Settings > Maps)
  2. Test with a different browser than Chrome - i.e. Firefox
  3. Test with a different webserver than IIS - i.e. Apache
  4. Make sure you're using an up-to-date version of Java - I would recommend that you use the Docker version of Metabase.

Besides the different region identifier, the maps from Aliyun works fine too.
You need to figure out what's wrong with your setup - I cannot help anymore.

@flamber

Do you use the Docker version of Metabase?I use the jvm version of Metabase, java version is “1.8.0_181”

Hi @flamber

Thanks for your help. I have solved this issue by changing the installation way to Docker.

1 Like

If you use “Java -jar metabase.jar”,just add a param, maybe like this “Java -Dfile.encoding=UTF-8 -jar metabase.jar”.

I also encountered the same problem with you. Have you solved it in what way

@TTTnny Start Metabase with UTF-8 encoding (example):
java -Dfile.encoding=UTF-8 -jar metabase.jar

There’s an issue open about doing this in Metabase by default:
https://github.com/metabase/metabase/issues/12962 - upvote by clicking :+1: on the first post