#1152 closed defect

nick_format broken on NetBSD (g_convert_with_fallback() always fails) — at Version 4

Reported by: harlos Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 3.2.1
Keywords: nick_format NetBSD patch Cc:
IRC client+version: Client-independent Operating System: NetBSD
OS version/distro: NetBSD 6.99.36 (evbarm)

Description (last modified by dx)

NetBSD's implementation of iconv does not appear to support //TRANSLIT. This means g_convert_with_fallback() called with //TRANSLIT will always fail.

With "acc fb set nick_format %full_name" this silently fails and the normal handles are used as if nick_format was never set.

With "acc fb set nick_format fb-%full_name" the failure is more significant as nick_gen() produces "fb-" for all contacts and then the nicks are padded with underscores.

Example (redacted columns):

10:05 <@harlos> blist
10:05 <@root> Nick
10:05 <@root> _________
10:05 <@root> fb-__
10:05 <@root> fb-_____________
10:05 <@root> l_______________

I think there are two solutions:

  1. Use gnu iconv on NetBSD
  2. Don't use //TRANSLIT for NetBSD (This is what attached path does)

Change History (7)

comment:1 Changed at 2014-04-22T03:24:28Z by dx

Giving up completely on nick translation is definitely not desirable. What's the resulting nick when the warning is thrown?

(Also the last patch has indentation issues)

comment:2 Changed at 2014-04-30T01:37:37Z by harlos

Below is the first column of the "blist". This occurs because nick_gen() returns "fb-" for all users when the nick_format is set to "fb-%full_name". nick_gen() does not totally fail and return NULL as I would expect. This is because the "fb-" portion is still generated.

21:32 <@harlos> blist
21:32 <@root> Nick             
21:32 <@root> __________       
21:32 <@root> _______________  
21:32 <@root> ________________ 
21:32 <@root> e_______________ 
21:32 <@root> fb-____          
21:32 <@root> fb-_________     
21:32 <@root> kb-_____________ 

comment:3 Changed at 2014-07-14T10:42:08Z by dx

Keywords: patch added

patch patch patch

comment:4 Changed at 2015-03-15T04:47:31Z by dx

Description: modified (diff)

fixing formatting of description.

Note: See TracTickets for help on using tickets.