After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572439 - Patch for CORBA_wstring_dup()
Patch for CORBA_wstring_dup()
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-19 15:53 UTC by Jules Colding
Modified: 2009-10-28 09:41 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Implementation of wstring_dup() (1.45 KB, patch)
2009-02-19 15:55 UTC, Jules Colding
none Details | Review

Description Jules Colding 2009-02-19 15:53:53 UTC
The next entry will have a patch implementing CORBA_wstring_dup(). Please review.
Comment 1 Jules Colding 2009-02-19 15:55:45 UTC
Created attachment 129074 [details] [review]
Implementation of wstring_dup()

I'll like to get another set of eyes on this before I commit. Is it a good idea anyway? I can see that e.g. PortableServer_ObjectId_to_wstring() could use it.
Comment 2 Michael Meeks 2009-02-23 19:13:14 UTC
looks fine to me; OTOH the concept of a separate 'wide-string' is so profoundly broken that the patch terrifies me ;-)

Repeat after me: UTF-8, UTF-8, UTF-8 ;-) [ man utf-8 ] ... UTF-16, or worse some franken UCS-2 are just disaster areas in programmatic form [IMHO etc.]
Comment 3 Jules Colding 2009-02-23 21:23:09 UTC
I couldn't agree more. UTF-8 is really the only sensible thing to use at all. Everything else is foolish. The problem is that I had an itch to scratch. 

I had an area of code which could only use wide strings. The reason was that the remote server expected wide strings. Naturally I could transfer as UTF-8 and convert to UTF-16 in the other end, but just using UTF-16 from the start at the client end would be so very much cleaner. 

Seeing that ORBit2 already had its share of wide string code made the anguish, of introducing this little helper function, much easier to bear ;-) 

Well, it's only ~10 lines so it's easy to cut out and use directly instead of putting it into the API - no major pain. If someone else think this patch is a good idea I'll commit, otherwise I'll just forget it...

Best,
  jules
Comment 4 Michael Meeks 2009-02-26 15:28:14 UTC
heh ! of course you can commit it ! there's no issue there - but consider the evils of utf-16 first ;-)
Comment 5 Kjartan Maraas 2009-10-02 10:21:36 UTC
Jules, did you want to commit this?
Comment 6 Michael Meeks 2009-10-23 11:59:28 UTC
Patch is trivial & we should get it in & close this, if we can.

Thanks.
Comment 7 Kjartan Maraas 2009-10-28 09:41:58 UTC
Commited.