<p>I've been running into errors importing specific entries in my custom module. Boils down to an issue with the Character Limit on the Plain Text fieldtype when importing international characters.</p>

<p>It seems like the Character Limit on the field is actually the number of bytes and not characters. The text I'm trying to import has some multi-byte Japanese characters, so it is reporting the length incorrectly.</p>

<p>I've had a poke around the Craft and yii source and found some <a href="https://github.com/yiisoft/yii2/blob/master/framework/validators/StringValidator.php#L130" rel="nofollow noreferrer">string validation</a>, but then it gets a bit beyond me.</p>

<p>For now I've just extended the length limit, but would good to work out if I have something setup incorrectly.</p>

CC BY-SA 4.0
2019-09-25T18:16:36.830Z
Sounds like a bug to me... would you mind creating an issue on https://github.com/craftcms/cms/issues so we can look into it more?
Brad Bell
CC BY-SA 4.0
2019-10-22T13:01:27.037Z
@BradBell added [Issue 5141](https://github.com/craftcms/cms/issues/5141)
Ant Cooper
<craft3><entries><localization>
Character Limit incorrect for international characters
# Character Limit incorrect for international characters

(Asked by: username_0 on 2019-09-25)

I've been running into errors importing specific entries in my custom module. Boils down to an issue with the Character Limit on the Plain Text fieldtype when importing international characters.

It seems like the Character Limit on the field is actually the number of bytes and not characters. The text I'm trying to import has some multi-byte Japanese characters, so it is reporting the length incorrectly.

I've had a poke around the Craft and yii source and found some [string validation](https://github.com/yiisoft/yii2/blob/master/framework/validators/StringValidator.php#L130), but then it gets a bit beyond me.

For now I've just extended the length limit, but would good to work out if I have something setup incorrectly.

**Tags:** craft3, entries, localization
> **Comments:**
> **username_1**: Sounds like a bug to me... would you mind creating an issue on https://github.com/craftcms/cms/issues so we can look into it more?  
> **username_0**: @BradBell added [Issue 5141](https://github.com/craftcms/cms/issues/5141)  

---

## 0 answers

