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

 
 

bug #16056: display correct html entities

Submitter:  None
Submitted:  Fri 10 Mar 2006 02:05:09 PM UTC
   
 
Category:  Internationalization Severity:  3 - Normal
Item Group:  Errors Status:  In Progress
Assigned to:  ggardey Open/Closed:  Open
Release:  * 1.3.3 Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-03-03 ggardey StatusNone In Progress
        Assigned toNone ggardey

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code