Page MenuHomeFreeBSD

Use iconv to ensure the output of calendar respects the output encoding
ClosedPublic

Authored by bapt on Feb 17 2019, 10:56 AM.

Details

Summary

Use iconv to ensure the output of calendar respects the output encoding

Test Plan

tested with french and russian calendars

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bapt created this revision.Feb 17 2019, 10:56 AM
jilles added a subscriber: jilles.Feb 17 2019, 1:03 PM
jilles added inline comments.
usr.bin/calendar/calendar.c
90–95 ↗(On Diff #54008)

Perhaps nl_langinfo(CODESET) is better than hard-coding the locale name format.

usr.bin/calendar/events.c
83 ↗(On Diff #54008)

Style: the open brace should be on a line by itself.

198 ↗(On Diff #54008)

This strdup is unnecessary. The pointer can be saved instead and freed after the asprintf.

bapt updated this revision to Diff 54011.Feb 17 2019, 3:41 PM

Address @jilles comments

bapt added a reviewer: jilles.Feb 17 2019, 3:42 PM
bapt updated this revision to Diff 54012.Feb 17 2019, 3:43 PM
bapt marked an inline comment as done.

Fix style

bapt marked 2 inline comments as done.Feb 17 2019, 3:44 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 20 2019, 6:41 AM
This revision was automatically updated to reflect the committed changes.