FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » mysql dynamic binding and pass-by-ref deprecated
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Unicode support [message #180987 is a reply to message #180986] Sat, 30 March 2013 22:14 Go to previous messageGo to previous message
Christoph Becker is currently offline  Christoph Becker
Messages: 91
Registered: June 2012
Karma:
Member
The Natural Philosopher wrote:

> On 30/03/13 20:26, Christoph Becker wrote:
>> The Natural Philosopher wrote:
>>
>>> so what happens in a typographic ligature like 'ᴁ'?
>>>
>>> I think you are making a rod for your back here.
>>>
>>> The storage requirements are exact specific and useful.
>>
>> Useful for what purpose?
>
> well malloc(strlen(str)) in C for a start, and picking single bytes out
> of strings too.

C's strlen() returning the number of bytes is perfectly fine. But in
PHP I don't need malloc(), and I have not yet found a reason to pick out
single bytes out of a *character* string (as opposed to a *byte* string,
which are different concepts IMO), except for emulating some UTF-8 aware
functionality.

Consider that programming in PHP happens on a higher level than in C
(e.g. one doesn't need to allocate heap memory, nor does one have to
free it). This results in the ability to write programs faster, that
run slower. But the fact, that PHP's string functions work on bytes
(opposed to characters), partially annihilates the advantage[1]. That
is particularly sad, as PHP has its strengths for web development and
UTF-8 is the de facto standard for the web.

[1] Say, I need a wordwrap() for sending UTF-8 encoded emails. Sigh...
BTW: <http://www.php.net/manual/en/function.wordwrap.php> says:

| wordwrap — Wraps a string to a given number of characters

what's obviously wrong; it wraps a string to a given number of bytes.

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need Forex Feed in PHP
Next Topic: can't get includes to load
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 16:20:43 GMT 2024

Total time taken to generate the page: 0.04378 seconds