I am using “pricer theme” in wordpress and I need to replace the English text to Japanese text. I replaced the text and this problem occurred.
HERE IS THE ORIGINAL CODE
<div class="box_content">
<script>
jQuery(document).ready(function() {
jQuery('.dd-submit-rating').click(function() {
var id = jQuery(this).attr('rel');
var uprating = jQuery("#rating_me-" + id + " :selected").val();
var reason = jQuery("#reason-" + id).val();
if(reason.length < 10) { alert("<?php _e('Please input a longer description for your rating','PricerrTheme'); ?>"); return false; }
jQuery.ajax({
type: "POST",
url: "<?php echo get_bloginfo('siteurl'); ?>/",
data: "rate_me=1&ids="+id+"&uprating="+uprating+"&reason="+reason,
success: function(msg){
jQuery("#post-" + id).hide('slow');
}
});
return false;
});
//-------------------------
});
</script>
And the original English pop up message
AND HERE IS THE REPLACED JAPANESE TEXT
<script>
jQuery(document).ready(function() {
jQuery('.dd-submit-rating').click(function() {
var id = jQuery(this).attr('rel');
var uprating = jQuery("#rating_me-" + id + " :selected").val();
var reason = jQuery("#reason-" + id).val();
if(reason.length < 10) { alert("<?php _e('ããå°ãæåãå¤ãã«ï¼è©³ç´°ï¼ã«è©ä¾¡ãã¦ãã ããã','PricerrTheme'); ?>"); return false; }
jQuery.ajax({
type: "POST",
url: "<?php echo get_bloginfo('siteurl'); ?>/",
data: "rate_me=1&ids="+id+"&uprating="+uprating+"&reason="+reason,
success: function(msg){
jQuery("#post-" + id).hide('slow');
}
});
return false;
});
//-------------------------
});
</script>
When I replaced Japanese text it shows this pop up box message in the browser.
Please help.
Here is the solution of converting Unicode NCR to JavaScript escapes form:
Working JSFiddle
Code snippets are adapted from Unicode code converter, a free tool to convert to and from different Unicode formats.