-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Json] how to read properly de.json #79
Comments
it doesn't work :(
```php
<?php
$text =
'{"AF":"Afghanistan","EG":"\u00c4gypten","AX":"\u00c5landinseln","AL":"Albanien","DZ":"Algerien","AS":"Amerikanisch-Samoa","VI":"Amerikanische
Jungferninseln","UM":"Amerikanische
\u00dcberseeinseln","AD":"Andorra","AO":"Angola","AI":"Anguilla","AQ":"Antarktis","AG":"Antigua
und
Barbuda","GQ":"\u00c4quatorialguinea","AR":"Argentinien","AM":"Armenien","AW":"Aruba","AC":"Ascension","AZ":"Aserbaidschan","ET":"\u00c4thiopien","AU":"Australien","BS":"Bahamas","BH":"Bahrain","BD":"Bangladesch","BB":"Barbados","BY":"Belarus","BE":"Belgien","BZ":"Belize","BJ":"Benin","BM":"Bermuda","BT":"Bhutan","BO":"Bolivien","BQ":"Bonaire,
Sint Eustatius und Saba","BA":"Bosnien und
Herzegowina","BW":"Botsuana","BR":"Brasilien","VG":"Britische
Jungferninseln","IO":"Britisches Territorium im Indischen
Ozean","BN":"Brunei Darussalam","BG":"Bulgarien","BF":"Burkina
Faso","BI":"Burundi","CV":"Cabo Verde","EA":"Ceuta und
Melilla","CL":"Chile","CN":"China","CK":"Cookinseln","CR":"Costa
Rica","CI":"C\u00f4te
d\u2019Ivoire","CW":"Cura\u00e7ao","DK":"D\u00e4nemark","DE":"Deutschland","DG":"Diego
Garcia","DM":"Dominica","DO":"Dominikanische
Republik","DJ":"Dschibuti","EC":"Ecuador","SV":"El
Salvador","ER":"Eritrea","EE":"Estland","EZ":"Eurozone","FK":"Falklandinseln","FO":"F\u00e4r\u00f6er","FJ":"Fidschi","FI":"Finnland","FR":"Frankreich","GF":"Franz\u00f6sisch-Guayana","PF":"Franz\u00f6sisch-Polynesien","TF":"Franz\u00f6sische
S\u00fcd- und
Antarktisgebiete","GA":"Gabun","GM":"Gambia","GE":"Georgien","GH":"Ghana","GI":"Gibraltar","GD":"Grenada","GR":"Griechenland","GL":"Gr\u00f6nland","GP":"Guadeloupe","GU":"Guam","GT":"Guatemala","GG":"Guernsey","GN":"Guinea","GW":"Guinea-Bissau","GY":"Guyana","HT":"Haiti","HN":"Honduras","IN":"Indien","ID":"Indonesien","IQ":"Irak","IR":"Iran","IE":"Irland","IS":"Island","IM":"Isle
of
Man","IL":"Israel","IT":"Italien","JM":"Jamaika","JP":"Japan","YE":"Jemen","JE":"Jersey","JO":"Jordanien","KY":"Kaimaninseln","KH":"Kambodscha","CM":"Kamerun","CA":"Kanada","IC":"Kanarische
Inseln","KZ":"Kasachstan","QA":"Katar","KE":"Kenia","KG":"Kirgisistan","KI":"Kiribati","CC":"Kokosinseln","CO":"Kolumbien","KM":"Komoren","CG":"Kongo-Brazzaville","CD":"Kongo-Kinshasa","XK":"Kosovo","HR":"Kroatien","CU":"Kuba","KW":"Kuwait","LA":"Laos","LS":"Lesotho","LV":"Lettland","LB":"Libanon","LR":"Liberia","LY":"Libyen","LI":"Liechtenstein","LT":"Litauen","LU":"Luxemburg","MG":"Madagaskar","MW":"Malawi","MY":"Malaysia","MV":"Malediven","ML":"Mali","MT":"Malta","MA":"Marokko","MH":"Marshallinseln","MQ":"Martinique","MR":"Mauretanien","MU":"Mauritius","YT":"Mayotte","MK":"Mazedonien","MX":"Mexiko","FM":"Mikronesien","MC":"Monaco","MN":"Mongolei","ME":"Montenegro","MS":"Montserrat","MZ":"Mosambik","MM":"Myanmar","NA":"Namibia","NR":"Nauru","NP":"Nepal","NC":"Neukaledonien","NZ":"Neuseeland","NI":"Nicaragua","NL":"Niederlande","NE":"Niger","NG":"Nigeria","NU":"Niue","KP":"Nordkorea","MP":"N\u00f6rdliche
Marianen","NF":"Norfolkinsel","NO":"Norwegen","OM":"Oman","AT":"\u00d6sterreich","TL":"Osttimor","PK":"Pakistan","PS":"Pal\u00e4stinensische
Autonomiegebiete","PW":"Palau","PA":"Panama","PG":"Papua-Neuguinea","PY":"Paraguay","PE":"Peru","PH":"Philippinen","PN":"Pitcairninseln","PL":"Polen","PT":"Portugal","PR":"Puerto
Rico","MD":"Republik
Moldau","RE":"R\u00e9union","RW":"Ruanda","RO":"Rum\u00e4nien","RU":"Russland","SB":"Salomonen","ZM":"Sambia","WS":"Samoa","SM":"San
Marino","ST":"S\u00e3o Tom\u00e9 und
Pr\u00edncipe","SA":"Saudi-Arabien","SE":"Schweden","CH":"Schweiz","SN":"Senegal","RS":"Serbien","SC":"Seychellen","SL":"Sierra
Leone","ZW":"Simbabwe","SG":"Singapur","SX":"Sint
Maarten","SK":"Slowakei","SI":"Slowenien","SO":"Somalia","MO":"Sonderverwaltungsregion
Macau","HK":"Sonderverwaltungszone
Hongkong","ES":"Spanien","SJ":"Spitzbergen","LK":"Sri Lanka","BL":"St.
Barth\u00e9lemy","SH":"St. Helena","KN":"St. Kitts und Nevis","LC":"St.
Lucia","MF":"St. Martin","PM":"St. Pierre und Miquelon","VC":"St. Vincent
und die
Grenadinen","ZA":"S\u00fcdafrika","SD":"Sudan","GS":"S\u00fcdgeorgien und
die S\u00fcdlichen
Sandwichinseln","KR":"S\u00fcdkorea","SS":"S\u00fcdsudan","SR":"Suriname","SZ":"Swasiland","SY":"Syrien","TJ":"Tadschikistan","TW":"Taiwan","TZ":"Tansania","TH":"Thailand","TG":"Togo","TK":"Tokelau","TO":"Tonga","TT":"Trinidad
und Tobago","TA":"Tristan da
Cunha","TD":"Tschad","CZ":"Tschechien","TN":"Tunesien","TR":"T\u00fcrkei","TM":"Turkmenistan","TC":"Turks-
und
Caicosinseln","TV":"Tuvalu","UG":"Uganda","UA":"Ukraine","HU":"Ungarn","UY":"Uruguay","UZ":"Usbekistan","VU":"Vanuatu","VA":"Vatikanstadt","VE":"Venezuela","AE":"Vereinigte
Arabische Emirate","US":"Vereinigte Staaten","GB":"Vereinigtes
K\u00f6nigreich","UN":"Vereinte Nationen","VN":"Vietnam","WF":"Wallis und
Futuna","CX":"Weihnachtsinsel","EH":"Westsahara","CF":"Zentralafrikanische
Republik","CY":"Zypern"}';
echo json_encode( $text, JSON_UNESCAPED_UNICODE );
```
2018-03-27 20:12 GMT+01:00 Saša Stamenković <notifications@github.com>:
… https://stackoverflow.com/questions/16498286/why-does-
the-php-json-encode-function-convert-utf-8-strings-to-hexadecimal-entit ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB-G2GvaEzle7UsuTYu9U5ea7bMy_O8_ks5tio8agaJpZM4S9bXz>
.
|
Try this: var_dump(json_decode(file_get_contents('vendor/umpirsky/country-list/data/de/country.json')));
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, how to get a safe data from json files (de.json for example) => \u00c5 == ?
{"AF":"Afghanistan","EG":"\u00c4gypten","AX":"\u00c5landinseln ...
The text was updated successfully, but these errors were encountered: