UTF8 Problems $opt["caption"] = "Angebot / Vertrag Details " . $name;

QuestionsUTF8 Problems $opt["caption"] = "Angebot / Vertrag Details " . $name;
Gert Zumtobel asked 1 year ago

UTF8 problem with:

$opt[“subGrid”] = true;
$opt[“subgridurl”] = “contractDetail”;
$opt[“subgridparams”] = “contract_firstname,contract_lastname”;

Subgrid
$g = new \jqgrid($db_conf);
$name = $_GET[“contract_lastname”];

$opt[“caption”] = “Offer / Contract Details ” . $name;

Error: Uncaught SyntaxError: expected expression, got ‘,’
Only occurs if there is ÜÖÄüöä in the last name? Umalute occurs in Germany, otherwise it works.
Database is UTF8 utf8mb4_unicode_ci

1 Answers
Abu Ghufran Staff answered 1 year ago

Hello,

With following line:

$name = $_GET[“contract_lastname”];

Try:

$name = utf8_encode($_GET[“contract_lastname”]);

Also share the complete code where you are using this variable $name.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

3 + 7 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?