Jump to content

eddietoast

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

1 Neutral

About eddietoast

  • Rank
    Newbie
  1. HI @Robin S, I tried testing Chinese characters with the white list yesterday and realised it should be the problem. I added a Chinese character in the whitelist and that character can be used for names, $config->pageNameWhitelist = '_.abcdefghijklmnopqrstuvwxyz0123456789æåäßöüđжхцчшщюяàáâèéëêěìíïîõòóôøùúûůñçčćďĺľńňŕřšťýžабвгдеёзийклмнопрстуфыэęąśł我'; Building a white list for Chinese characters can be a problem (in terms of quantity) so I ended up using RAND() as a temporary solution. And thanks for recommending the slugger and I think it's very useful. I just wonder whether it supports Cantonese conversion as well? Anyway I will test further and see how it works. Many thanks for your reply and noted on the code formatting in the post ; ).
  2. Hi all , just an update regarding my question. I found out it's due to the importPageValue function. The processwire path sanitizer cannot create the appropriate path name and it leds to a failure of creating pages without an ascii character on the title. $page->set($name, $value); if($name == 'title') $page->name = $this->sanitizer->pageName($value, 2); // Sanitizer::translate I tried appending a rand at the end of $page->name and the csv can be imported. However no matter whether I tried $this->sanitizer->pageName(utf8decode($value), 2) Or $this->sanitizer->pageName($value, Sanitizer::toUTF8) They do not work. Can anyone advise me if anything is done wrongly? Thanks all.
  3. Hi all, new processwire user here. I am trying to to import a number of post with Chinese/UTF-8 titles, but the module can only import those with latin characters. Can anyone advise me how to solve it? The best is for sure to display the UTF-8 permalink same with the title, but it's also okay just to have permalinks with numbers or random characters. Any advice for the tweak or pointing me the right direction of changing the code is appreciated.
×
×
  • Create New...