---
title: "Decode Greek characters in JSON PHP"  
description: "Decode Greek characters in JSON PHP"  
author: "Anonymous User"  
published: 2013-06-20  
updated: 2013-06-20  
canonical: https://www.mindstick.com/forum/1236/decode-greek-characters-in-json-php  
category: "json"  
tags: ["json"]  
reading_time: 1 minute  

---

# Decode Greek characters in JSON PHP

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances),\
\
I have an XML [document](https://www.mindstick.com/articles/328642/what-to-consider-while-choosing-a-software-documentation-tool) that contains greek [characters](https://answers.mindstick.com/qa/42112/who-is-the-originator-of-avengers-characters) and works perfectly. When I [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) it to [JSON](https://www.mindstick.com/forum/34446/convert-json-string-to-object) using [PHP](https://www.mindstick.com/articles/12149/php-constant-and-php-variables) the greek characters are being encoded.\
\
{"id":"101","[name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide)":"\u0398\u0397\u039a\u0395\u03a3 \u0397\/\u03a5"}\
\
What I do is: Write xml to a [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp) and then read the file and convert it to JSON\
\
$[handle](https://www.mindstick.com/articles/311004/suede-skillet-handle-cover) = fopen("xml_cat.xml","w+");\
fwrite($handle, $xml);\
$sxml = simplexml_load_file('xml_cat.xml');\
[echo](https://www.mindstick.com/articles/23392/be-a-21st-century-shopper-and-use-your-amazon-echo-for-holiday-shopping) json_encode($sxml);\
\
How can I get greek characters back?\
\
Any help on above is really appreciated.\

## Replies

### Reply by Sumit Kesarwani

Hi Brad,\
Any client which can properly decode the JSON format will get the original characters back. "\uXXXX" is a perfectly valid transport encoding for arbitrary characters in the JSON format. You don't need to do anything special, you just need to decode the JSON properly; something you're doing anyway when working with JSON. \
\
\


---

Original Source: https://www.mindstick.com/forum/1236/decode-greek-characters-in-json-php

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
