Text::...nicode(3pm)
π Text::CSV::Unicode π
okay so bestie, this is Text::CSV::Unicode β a Perl module, and it lives in your friendly neighbourhood User Contributed Perl Documentation section of the manual (that's the 3pm bit, iykyk). Let me put you on. π«Ά
β¨ NAME β¨
Text::CSV::Unicode β comma-separated values manipulation routines with potentially wide character data. it's giving CSV but make it Unicode. π
πΈ SYNOPSIS πΈ
use Text::CSV::Unicode;
$csv = Text::CSV::Unicode->new();
# then use methods from Text::CSV
$version = Text::CSV::Unicode->VERSION(); # get the module version
$csv = Text::CSV::Unicode->new(); # create a new object
$status = $csv->combine(@columns); # combine columns into a string
$line = $csv->string(); # get the combined string
$status = $csv->parse($line); # parse a CSV string into fields
@columns = $csv->fields(); # get the parsed fields
$status = $csv->status(); # get the most recent status
$bad_argument = $csv->error_input();# get the most recent bad argument
like. look at her go. π
π¦ DESCRIPTION π¦
Text::CSV::Unicode provides facilities for the composition and decomposition of comma-separated values, based on Text::CSV. So it's the same iconic energy, but Text::CSV::Unicode allows for input with wide character data β and it does not permit control characters. that's the whole personality. no control chars allowed, periodt. π
π Incompatible Changes π
π Option always_quote=>1 (v0.300) π
Before v0.300, the module behaviour defaulted to "always_quote => 1" in Text::CSV. This behaviour was only needed in tests.
To recreate the old behaviour:
$csv = Text::CSV::Unicode->new( { always_quote => 1 } );
she changed her mind, it's fine, it happens. π
π DEPRECATED π
The option "binary => 1" does not require this module.
This code issues a 'deprecated' warning and creates a Text::CSV object:
$csv = Text::CSV::Unicode->new( { binary => 1 } );
β οΈ heads up bestie β if you write that, Perl WILL warn at you. deprecated means deprecated, no cap. π
π METHODS π
π VERSION
This function may be called as a class or an object method. As a class method, it returns the current module version. As an object method, it returns the version of the underlying Text::CSV module.
π version
An object method: it returns the backend module version.
π new
$csv = Text::CSV::Unicode->new( [{ binary => 1 }] );
This function may be called as a class method. It returns a reference to a newly created object.
"binary => 0" allows the same ASCII input as Text::CSV.
"binary => 1" allows for all Unicode characters in the input (including \r and \n): the same functionality as "Text::CSV->new( { binary => 1 }".
π combine
$status = $csv->combine(@columns);
This object function constructs a CSV string from the arguments, returning success or failure. Failure can result from lack of arguments or an argument containing an invalid character.
Silently accepts undef values in input and treats as an empty string.
π parse
$status = $csv->parse($line);
This object function decomposes a CSV string into fields, returning success or failure. Failure can result from a lack of argument or the given CSV string is improperly formatted. Upon failure, the value returned by "fields()" is undefined and "error_input()" can be called to retrieve the invalid argument.
π©Ί DIAGNOSTICS π©Ί
None
βοΈ CONFIGURATION AND ENVIRONMENT βοΈ
See HASH option to "->new".
π§ DEPENDENCIES π§
perl 5.8.0Text::CSV 1.0
β VERSION β
0.400
πΈ AUTHOR πΈ
Robin Barker <rmbarker@cpan.org>
π₯ SEE ALSO π₯
Text::CSV
π LICENSE AND COPYRIGHT π
Copyright (c) 2007, 2008, 2010, 2011, 2012, 2018 Robin Barker. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The documentation of Text::CSV::Unicode methods that are inherited from Text::CSV is taken from Text::CSV 0.01 (with some reformatting) and is Copyright (c) 1997 Alan Citterman.
and that's the whole page, bestie π«Ά this lil writeup came to you via perl v5.36.0, dated 2023-01-27 β stay Unicode, stay iconic, and please stop passing control characters. mwah. π
β¨
π¦ where this page comes from
- debian bookworm: libtext-csv-unicode-perl 0.400-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtext-csv-unicode-perl 0.400-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtext-csv-unicode-perl 0.400-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtext-csv-unicode-perl 0.400-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-csv-unicode-perl 0.400-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms