Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #18369 > unrolled thread
| Started by | cb <cb@ppt.io.it> |
|---|---|
| First post | 2020-10-03 11:46 +0200 |
| Last post | 2020-10-03 17:04 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.php
display "national" characters cb <cb@ppt.io.it> - 2020-10-03 11:46 +0200
Re: display "national" characters Jan Hansen <jan_hansen@sniper-pistol.com> - 2020-10-03 13:13 +0200
Re: display "national" characters cb <cb@ppt.io.it> - 2020-10-03 17:04 +0200
| From | cb <cb@ppt.io.it> |
|---|---|
| Date | 2020-10-03 11:46 +0200 |
| Subject | display "national" characters |
| Message-ID | <rl9ha9$16en$1@gioia.aioe.org> |
I have a field (from DB) that contains
Andr%C3%A9
I would like to show it as
André
I'm very poor in php, but after much googling my "best" is the following
-------------------------------------------------------------------------------
<!DOCTYPE html>
<!-- html lang="en" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<?php
$t="Andr%C3%A9";
echo (utf8_decode("$t")."<br>\n");
echo ("I would expect:André:<br>");
?>
</body>
</html>
-------------------------------------------------------------------------------
:-(
Can someone help me ?
TIA
[toc] | [next] | [standalone]
| From | Jan Hansen <jan_hansen@sniper-pistol.com> |
|---|---|
| Date | 2020-10-03 13:13 +0200 |
| Message-ID | <20201003131353.d911a70d41d1dd79ca2f8633@sniper-pistol.com> |
| In reply to | #18369 |
cb wrote:
> I have a field (from DB) that contains
> Andr%C3%A9
> I would like to show it as
> André
Try
-------------------------------------------------------------------------------
<!DOCTYPE html>
<!-- html lang="en" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"
/>
</head>
<body>
<?php
$t="Andr%C3%A9";
echo urldecode($t)."<br>\n";
echo ("I would expect:André:<br>");
?>
</body>
</html>
-------------------------------------------------------------------------------
--
mvh Jan.
Help Microsoft stamp out piracy. Give
Linux to a friend today!
[toc] | [prev] | [next] | [standalone]
| From | cb <cb@ppt.io.it> |
|---|---|
| Date | 2020-10-03 17:04 +0200 |
| Message-ID | <rla3t4$16qu$1@gioia.aioe.org> |
| In reply to | #18370 |
On 10/3/20 1:13 PM, Jan Hansen wrote: > echo urldecode($t)."<br>\n"; THANK YOU !
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web