Skip to content

Feature: Wrap position choice for single/double bytes characters mixed lines is incorrect #3674

@zhenzh

Description

@zhenzh

Brief summary of issue / Description of requested feature:

For general english words, space is the best choice for ling wrapping as it avoides the whold word being divided. While such case doesn't meet the requirement for mixed lines as space will not be the only separator.
For example, in Chinese, each two word can be separated without space existing.

Steps to reproduce the issue / Reasons for adding feature:

Error output / Expected result of feature

To separate the line:

abc abc abc 口口口口口口口口口口口口口口口口口口 abc abc abc 口口口口口口口口口口口口口口口口口口口口口

The best separate for such line will be:

abc abc abc 口口口口口口口口口口口口口口
口口口口 abc abc abc 口口口口口口口口口
口口口口口口口口口口口口

while space based separate will get the line looks like: 

abc abc abc
口口口口口口口口口口口口口口口口口口
abc abc abc
口口口口口口口口口口口口口口口口口口口口口

A strange show which get single bytes and double bytes divided into different lines.

Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:

For lines containing doube bytes character, the wrap logic can be changed to:

  1. Check the character at the position that specified wrap number.
  2. If it's a single byte character, follow the space based separate rule.
  3. If it's a doube bytes character, separate line based on any doube bytes character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n & l10ninternationalization and localizationindentation/word wrapAn issue related to indentation/word wrapping in Mudlet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions