2010-08-01 1 views
0

CKEditor/PHP/MySQL/HTMLPurifier에서 작동하는 UTF-8 인코딩을 얻으려고합니다.'+'문자가 CKEditor/PHP/MySQL/HTMLPurifier를 통해 저장되지 않습니다.

데이터베이스 테이블/필드의 문자 집합을 utf8-unicode-ci로 변환했습니다.

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

를 그리고 PHP는 기본 설정으로 HTMLPurifier으로 HTML을 정화된다하여 ckeditor의 설정에서 다음

내가 설정했습니다.

UTF-8을 받아들이려는 시도가 올바른지 잘 모르겠지만 α와 같은 문자는 작동하지만 ... 어떤 이유로 텍스트의 '+'문자가 사라집니다. .

아이디어가 있으십니까?

+2

+ 표시는 어떻게 든 URL 인코딩/디코딩 왕복을하고있는 것을 나타내는 것 같다 사라지고이

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); 

마 노스 시도 하지만 당신이 정말로 말할 수있는 충분한 정보를주지 못했습니다. 플러스 기호가 공백으로 바뀝니 까? 디버깅 문을 넣을 수 있습니까? HTML 정수기는 무엇을 볼 수 있습니까? –

답변

0

jQuery/AJAX가 이미 인코딩 한 반면, 게시물 요청 전에 텍스트를 불필요하게 urlencoded했습니다. 자바 스크립트 인 encode()와 PHP urldecode()를 제거하고 문제를 수정했습니다.

0

게시 요청 전에 텍스트가 URL 인코딩되어 있는지 확인하십시오.

텍스트를 'urlencode'하지 않으면 '+'문자가 공백으로 처리됩니다. 텍스트를 urlencode하면 '+'문자는 '% 2B'처럼 보입니다.

0

CKEditor 3.x 및 더 큰 및 PHP는 형태의은, 그리스

관련 문제