0

UTF-8エンコーディングをCKEditor/PHP / MySQL/HTMLPurifierで動作させようとしています。

データベースのテーブル/フィールドの文字セットをutf8-unicode-ciに変換しました。

ckeditorの設定で次のように設定しました。

config.entities = true;
config.entities_latin = true;
config.entities_greek = true;
config.entitles_processNumerical = true; 

そして、PHPはデフォルト設定のHTMLPurifierでHTMLを浄化しています。

UTF-8を受け入れようとして正しいことをしているのかどうかはわかりませんが、αなどの文字は機能しています...しかし、何らかの理由で、テキスト内の「+」は単に消えてしまいます。

何か案は?

4

3 に答える 3

0

CKEditor 3.x以降およびphpフォームの場合は、これを試してください

include_once "ckeditor/ckeditor.php";
// The initial value to be displayed in the editor.
$initialValue = 'This is a test  - Αυτο ειναι ενα τεστ';
// Create class instance.
$CKEditor = new CKEditor();
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
// If not set, CKEditor will try to detect the correct path.
$CKEditor->basePath = 'ckeditor/';
$CKEditor->config['height'] = 450;
$CKEditor->config['skin'] = 'kama';
**$CKEditor->config['entities_greek'] = false;**
$CKEditor->editor('MyEditor',$initialValue);

マノスギリシャ語

于 2010-11-16T13:13:54.443 に答える
0

ポストリクエストの前に、テキストがurlencodingされていることを確認してください。

テキストを「urlencode」しない場合、「+」文字はスペースとして扱われます。テキストをurlencodeすると、「+」文字は「%2B」のようになります。

于 2010-08-02T06:43:54.290 に答える
0

jQuery / AJAXがすでにテキストをエンコードしている間に、POSTリクエストの前にテキストを不必要にurlencodeしていました。javascript encode()とPHP urldecode()を削除し、問題を修正しました。

于 2010-08-04T10:00:39.097 に答える