Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6067
| Path | csiph.com!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!news.osn.de!diablo2.news.osn.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
| Newsgroups | comp.lang.php |
| Subject | Re: pgsql and exception |
| Date | Tue, 15 May 2012 09:32:52 +0200 |
| Lines | 42 |
| Message-ID | <a1ef54F5v1U1@mid.uni-berlin.de> (permalink) |
| References | <4fb0a891$0$1739$426a34cc@news.free.fr> <joqd6d$8bd$1@dont-email.me> <4fb0f971$0$21929$426a74cc@news.free.fr> <a1cdojFsjmU2@mid.uni-berlin.de> <4fb10800$0$1739$426a74cc@news.free.fr> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de y9xrNcISSt33o4QBeZldYwd9KwPn+fdjypjj030dMUPoM2GZLMM036xil0k1TJxKs= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
| In-Reply-To | <4fb10800$0$1739$426a74cc@news.free.fr> |
| Xref | csiph.com comp.lang.php:6067 |
Show key headers only | View raw
Am 14.05.2012 15:26, schrieb Une Bévue:
> On 14/05/12 14:56, M. Strobel wrote:
>> how about substr()?
> right I'm testing that however I'm not sure it works with accentuated (UTF-8)
> characters.
>
> for example with :
> --- code ---------------------------------------------------------------
> <?php
> header('Content-Type:text/html; charset=utf-8');
>
> $str="Etre ou ne pas etre, telle est est la question.";
> echo $str."<br />";
> echo strlen($str)."<br />";
> echo substr($str, 0, 16)."<br />";
>
> $str="Être ou ne pas être, telle est est la question."; // Accentuated
> echo $str."<br />";
> echo strlen($str)."<br />";
> echo substr($str, 0, 16)."<br />";
>
> ?>
> ------------------------------------------------------------------------
>
> I get :
> Etre ou ne pas etre, telle est est la question.
> 47
> Etre ou ne pas e
> Être ou ne pas être, telle est est la question.
> 49
> Être ou ne pas
>
If you don't know the reason the accented version is longer, read about utf-8.
/Str.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 08:39 +0200
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 09:10 +0200
Re: pgsql and exception "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-14 09:34 +0200
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 14:17 +0200
Re: pgsql and exception Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-14 09:38 -0400
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 16:59 +0200
Re: pgsql and exception "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-05-14 09:45 +0200
Re: pgsql and exception "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-14 10:18 +0200
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 14:24 +0200
Re: pgsql and exception "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-14 14:54 +0200
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 15:03 +0200
Re: pgsql and exception "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-14 14:56 +0200
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 15:26 +0200
Re: pgsql and exception "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-14 22:33 +0200
Re: pgsql and exception "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-15 09:32 +0200
Re: pgsql and exception Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-14 09:40 -0400
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 17:02 +0200
Re: pgsql and exception Shake <QUITAESTO@QUITAESTO.NOES> - 2012-05-14 17:19 +0200
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-14 20:46 +0200
Re: pgsql and exception Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-14 14:55 -0400
Re: pgsql and exception Une Bévue <unbewusstsein@fai.invalid> - 2012-05-15 08:00 +0200
Re: pgsql and exception Luuk <luuk@invalid.lan> - 2012-05-14 21:48 +0200
csiph-web