Re: [Firebird-devel] Server-side plugins and character sets

2014-07-02 Thread Alex Peshkoff
On 07/01/14 19:26, Adriano dos Santos Fernandes wrote:
 Hi!

 We should decide what should happens with character sets and server-side
 plugins. I talked specifically at external engines, but the same may be
 valid for trace and whatever.

 My idea is that the ExternalContext should have a setCharSet method so
 that server-side user code could set its own connection charset. This
 connection charset remains active until user code returns to engine.

 So far, so good. But there are more problems. At the moment, we return
 const char* in various methods, say IRoutineMetadata::getName and
 others. These returns utf-8 data.

 They are simple (just returns), but may not be convenient in all situations.

 Options would be the user to pass a buffer and a character set. Or a
 additional API method specifically suitable for conversions.

 Opinions?

Getting const char* in UTF8 charset is OK for most cases. I think that 
adding API method for conversions should be enough for cases when 
(crazy) user needs non-UTF8. First of all to ensure plugins portability 
between windows and the rest.

Just one tech detail - if we define such method somewhere in main 
interfaces set (like IUtl) would not it mean that fbclient library start 
to depend from ICU? Telling true there is _big_ desire to avoid such 
dependency, specially on windows.

A.


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-02 Thread Paul Beach

Just one tech detail - if we define such method somewhere in main 
interfaces set (like IUtl) would not it mean that fbclient library start 
to depend from ICU? Telling true there is _big_ desire to avoid such 
dependency, specially on windows.

And on MacOSX.

Regards
Paul

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-02 Thread Dimitry Sibiryakov
02.07.2014 15:51, Alex Peshkoff wrote:
 Getting const char* in UTF8 charset is OK for most cases.

   Why not wchar_t?

-- 
   WBR, SD.

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-02 Thread Adriano dos Santos Fernandes
On 02/07/2014 10:51, Alex Peshkoff wrote:
 On 07/01/14 19:26, Adriano dos Santos Fernandes wrote:
 Hi!

 We should decide what should happens with character sets and server-side
 plugins. I talked specifically at external engines, but the same may be
 valid for trace and whatever.

 My idea is that the ExternalContext should have a setCharSet method so
 that server-side user code could set its own connection charset. This
 connection charset remains active until user code returns to engine.

 So far, so good. But there are more problems. At the moment, we return
 const char* in various methods, say IRoutineMetadata::getName and
 others. These returns utf-8 data.

 They are simple (just returns), but may not be convenient in all situations.

 Options would be the user to pass a buffer and a character set. Or a
 additional API method specifically suitable for conversions.

 Opinions?
 Getting const char* in UTF8 charset is OK for most cases. I think that 
 adding API method for conversions should be enough for cases when 
 (crazy) user needs non-UTF8. First of all to ensure plugins portability 
 between windows and the rest.

 Just one tech detail - if we define such method somewhere in main 
 interfaces set (like IUtl) would not it mean that fbclient library start 
 to depend from ICU? Telling true there is _big_ desire to avoid such 
 dependency, specially on windows.


This problem will not happen if it's added to ExternalContext.


Adriano


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-02 Thread Dimitry Sibiryakov
02.07.2014 15:51, Alex Peshkoff wrote:
 Just one tech detail - if we define such method somewhere in main
 interfaces set (like IUtl) would not it mean that fbclient library start
 to depend from ICU? Telling true there is_big_  desire to avoid such
 dependency, specially on windows.

   Every modern compiler's RTL has support for wchar_t and every OS already 
provide API 
for converting it into any desired character set. I see no point to duplicate 
this 
functionality.

-- 
   WBR, SD.

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-02 Thread Alex Peshkoff
On 07/02/14 18:42, Adriano dos Santos Fernandes wrote:
 On 02/07/2014 10:51, Alex Peshkoff wrote:
 On 07/01/14 19:26, Adriano dos Santos Fernandes wrote:
 Hi!

 We should decide what should happens with character sets and server-side
 plugins. I talked specifically at external engines, but the same may be
 valid for trace and whatever.

 My idea is that the ExternalContext should have a setCharSet method so
 that server-side user code could set its own connection charset. This
 connection charset remains active until user code returns to engine.

 So far, so good. But there are more problems. At the moment, we return
 const char* in various methods, say IRoutineMetadata::getName and
 others. These returns utf-8 data.

 They are simple (just returns), but may not be convenient in all situations.

 Options would be the user to pass a buffer and a character set. Or a
 additional API method specifically suitable for conversions.

 Opinions?
 Getting const char* in UTF8 charset is OK for most cases. I think that
 adding API method for conversions should be enough for cases when
 (crazy) user needs non-UTF8. First of all to ensure plugins portability
 between windows and the rest.

 Just one tech detail - if we define such method somewhere in main
 interfaces set (like IUtl) would not it mean that fbclient library start
 to depend from ICU? Telling true there is _big_ desire to avoid such
 dependency, specially on windows.


 This problem will not happen if it's added to ExternalContext.

And it will be possible to use ExternalContext's charset avoiding need 
to provide it in the call? Good place.


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-01 Thread Dimitry Sibiryakov
01.07.2014 17:26, Adriano dos Santos Fernandes wrote:
 We should decide what should happens with character sets and server-side
 plugins. I talked specifically at external engines, but the same may be
 valid for trace and whatever.

 Opinions?

   Make them unicode-only as had been suggested many times by many people.

-- 
   WBR, SD.

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Server-side plugins and character sets

2014-07-01 Thread Adriano dos Santos Fernandes
On 01/07/2014 12:30, Dimitry Sibiryakov wrote:
 01.07.2014 17:26, Adriano dos Santos Fernandes wrote:
 We should decide what should happens with character sets and server-side
 plugins. I talked specifically at external engines, but the same may be
 valid for trace and whatever.

 Opinions?
Make them unicode-only as had been suggested many times by many people.

And at the same time, we make Windows, all files present in all HDDs in
the world, and everything unicode-only. Perfect.

And then even the unicode-people will complain, because we chose one
unicode-encoding, while they want another one.


Adriano


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel