Modify

Opened 11 years ago

Closed 10 years ago

#3 closed task (fixed)

Create wrapper functions for multibyte string functions

Reported by: julian Owned by: chrissyx
Priority: major Milestone: Beta 1
Component: General Version: 2.0
Keywords: Cc:

Description

Currently, TBB2 uses standard string functions such as strlen(). As TBB2 will use UTF-8 only, we have to use mb_strlen() instead. But replacing all functions by their multibyte correspondents is not very intelligent and mbstring.func_overload is often not available, we have to write wrapper functions such as Functions::strlen(). As a disadvantage, TBB2 will require mbstring support but that will not be avoidable (writing our complete own mbstring functions will be too slow).

Attachments (0)

Change History (5)

comment:1 Changed 11 years ago by julian

  • Summary changed from Create wrapper functions for multiby string functions to Create wrapper functions for multibyte string functions

comment:2 Changed 11 years ago by chrissyx

Anmerkung: Für str_replace() gibt es keine Multibyte-Version, es wird derzeit einfach weiterhin str_replace() benutzt.

comment:3 Changed 10 years ago by julian

  • Owner changed from julian to chrissyx

comment:4 Changed 10 years ago by chrissyx

Eventuell ist es geschickter, sich sämtliche Extra-Wrapper-Funktionen zu sparen und statt dessen einen Eintrag in der php.ini zu setzen:

ini_set('mbstring.func_overload', '2');

Dies bewirkt, dass alle str*()-Funktionen die mb-Variante nutzen. Die 4 würde alle ereg*()-Funktionen und die 1 die mail() Funktion überladen. Man kann auch kombinieren oder einfach alles mit der 7 überladen.

comment:5 Changed 10 years ago by chrissyx

  • Resolution set to fixed
  • Status changed from new to closed

Benötigte Wrapper-Funktionen sind soweit drin (Functions.class.php, ab Zeile ~500). Eventuell fehlen noch welche, aber das sieht man dann, wenn's soweit ist.

Add Comment

Modify Ticket

Action
as closed The owner will remain chrissyx.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.