View Issue Details

IDProjectCategoryView StatusLast Update
0036078LazarusLazUtilspublic2019-10-04 14:48
ReporterAlexey Tor.Assigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityN/A
Status assignedResolutionreopened 
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0036078: Wish: split arrays (encoding pages) from LConvEncoding to .inc file
DescriptionLConvEncoding unit has many arrays (encoding tables):

const
  ArrayISO_8859_1ToUTF8: TCharToUTF8Table = (
  ArrayISO_8859_15ToUTF8: TCharToUTF8Table = (
  ArrayISO_8859_2ToUTF8: TCharToUTF8Table = (
  ArrayCP1250ToUTF8: TCharToUTF8Table = (
  ArrayCP1251ToUTF8: TCharToUTF8Table = (
  ArrayCP1252ToUTF8: TCharToUTF8Table = (
  ArrayCP1253ToUTF8: TCharToUTF8Table = (
  ArrayCP1254ToUTF8: TCharToUTF8Table = (
  ArrayCP1255ToUTF8: TCharToUTF8Table = (
  ArrayCP1256ToUTF8: TCharToUTF8Table = (
  ArrayCP1257ToUTF8: TCharToUTF8Table = (
  ArrayCP1258ToUTF8: TCharToUTF8Table = (
  ArrayCP437ToUTF8 : TCharToUTF8Table = (
  ArrayCP850ToUTF8 : TCharToUTF8Table = (
  ArrayCP852ToUTF8 : TCharToUTF8Table = (
  ArrayCP866ToUTF8 : TCharToUTF8Table = (
  ArrayCP874ToUTF8: TCharToUTF8Table = (
  ArrayKOI8ToUTF8: TCharToUTF8Table = (
  ArrayMacintoshToUTF8: TCharToUTF8Table = (

they are big part of the unut. We have separate asian tables in the asiancodepages.inc, so my wish is to split all those tables to .inc file too. Suggested name is commoncodepages.inc (or isocodepages.inc + commoncodepages.inc).

I write some library and it's good to have .inc file for me. Otherwise I need big copy/paste (and code duplication with LazUtils).

TagsNo tags attached.
Fixed in Revisionr61971
LazTarget-
Widgetset
Attached Files

Activities

Juha Manninen

2019-10-03 20:47

developer   ~0118294

Yes, fair enough. Done.

Alexey Tor.

2019-10-03 21:08

reporter   ~0118295

Last edited: 2019-10-03 21:14

View 5 revisions

Thanks.
Can we make "next step"?
1) Rework 2 files asiancodepages.inc / commoncodpages.inc to UNITS - with better names too - CodepagesAsian, CodepagesCommon. These units will have all those arrays in Interface.
1b) Put there also these functions:
https://github.com/Alexey-T/EncConv/blob/master/encconv/encconv_commoncodepagefunctions.inc
(URL shows functions from LazUtils)
2) Add new units to LazUtils LPK.

Why?
My library https://github.com/alexey-t/EncConv today makes 200K overhead (duplicated arrays with LazUtils).

Juha Manninen

2019-10-03 22:08

developer   ~0118297

> My library https://github.com/alexey-t/EncConv today makes 200K overhead (duplicated arrays with LazUtils).

I thought the .inc file would help with that.
Why do you need your own conversion funcs? If functions are missing from LConvEncoding or if they are buggy, they should be added/fixed instead.

Alexey Tor.

2019-10-04 14:48

reporter   ~0118322

Own funcs? I made changes to LazUtils conv funcs, see
https://github.com/Alexey-T/EncConv/blob/master/readme.txt

Why units are needed? you know, my code cannot find LazUtils .inc file. If it can, data (codepage arrays) in .inc files will be duplicated in exe (LazUtils uses this .inc file too).

Issue History

Date Modified Username Field Change
2019-09-15 19:43 Alexey Tor. New Issue
2019-10-03 20:44 Juha Manninen Assigned To => Juha Manninen
2019-10-03 20:44 Juha Manninen Status new => assigned
2019-10-03 20:47 Juha Manninen Status assigned => resolved
2019-10-03 20:47 Juha Manninen Resolution open => fixed
2019-10-03 20:47 Juha Manninen Fixed in Revision => r61971
2019-10-03 20:47 Juha Manninen LazTarget => -
2019-10-03 20:47 Juha Manninen Note Added: 0118294
2019-10-03 21:08 Alexey Tor. Status resolved => assigned
2019-10-03 21:08 Alexey Tor. Resolution fixed => reopened
2019-10-03 21:08 Alexey Tor. Note Added: 0118295
2019-10-03 21:11 Alexey Tor. Note Edited: 0118295 View Revisions
2019-10-03 21:12 Alexey Tor. Note Edited: 0118295 View Revisions
2019-10-03 21:13 Alexey Tor. Note Edited: 0118295 View Revisions
2019-10-03 21:14 Alexey Tor. Note Edited: 0118295 View Revisions
2019-10-03 22:08 Juha Manninen Note Added: 0118297
2019-10-04 14:48 Alexey Tor. Note Added: 0118322