bugBibORB - Bugs: bug #16056, display correct html entities

 
 

bug #16056: display correct html entities

Submitted by:  None
Submitted on:  Fri 10 Mar 2006 02:05:09 PM UTC  
 
Category: InternationalizationSeverity: 3 - Normal
Item Group: ErrorsStatus: In Progress
Assigned to: Guillaume Gardey <ggardey>Open/Closed: Open
Release: 1.3.3Fixed Release: None
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 03 Mar 2007 08:12:26 AM UTC, comment #1:

Task https://savannah.nongnu.org/task/?6579 opened to solve display and saving of special characters.

Guillaume Gardey <ggardey>
Project AdministratorIn charge of this item.
Fri 10 Mar 2006 02:05:09 PM UTC, original submission:

Hello!
If you use the german locale then the umlaut will not be displayed properly. This seems to be an error of the function msg() in the file i18n.php and load_file() in utitlities.php. I used the following lines to solve this problem:

function load_file($filename) {
$entities = get_html_translation_table(HTML_ENTITIES);
$spectial = get_html_translation_table(HTML_SPECIALCHARS);

$transChars = array_diff( $entities, $spectial );
return strtr(implode('',file($filename)),$transChars );
}

function msg($string){
$entities = get_html_translation_table(HTML_ENTITIES);
$spectial = get_html_translation_table(HTML_SPECIALCHARS);

$transChars = array_diff( $entities, $spectial );

// should return _($string) if gettext well supported
return strtr((array_key_exists($string, $_SESSION[$_SESSION['language']]) ? $_SESSION[$_SESSION['language']][$string] : $string)$}

I don't know if this is the best way to solve it but for me it works :-)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ggardey (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 03 Mar 2007 08:12:56 AM UTCggardeyStatusNone=>In Progress
      Assigned toNone=>ggardey

    Back to the top


    Powered by Savane 3.1-cleanup1