Creating Language Plugin not used for new language

Sven Brauch mail at svenbrauch.de
Mon Jul 16 17:56:16 BST 2018


Hi,

On 07/16/2018 06:40 PM, Roland Plüss wrote:
> My main problem right now seems to be UTF8. I'm using a simple
> test-script consisting of the typical header-GPL-notice, some empty
> lines and one declaration line. The problem is that the
> header-GPL-notice contains my name, and thus a UTF8 only character. The
> Lexer seems to be thrown off my one character there resulting in the
> lexing not working correctly. I have no clue though how I can fix this.

I don't know unfortunately, but I know that other languages notoriously
also used to have problems with utf8 characters in strings messing up
offsets. Did you check whether it works in kdev-php (which is the only
actively maintained language plugin also using kdev-pg-qt)? If it does,
you might be able to see what they do differently there.

Otherwise it is also a question what you consider the correct offsets --
counting UTF8 code points? That is not necessarily the offset you give
to the editor, that might be UTF16 surrogates ... but that shouldn't
matter for an 'ü' of course.

Best,
Sven

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180716/dedecd01/attachment.sig>


More information about the KDevelop-devel mailing list