Tag Info

Hot answers tagged

3

UTF-8 is the most widely used format for encoding text at this time, and is likely how any 'modern' editor you're using is encoding your text. However, despite using the same character encoding, different editors may still be producing text files that are not binary equivalents. For example, when terminating a line, Windows systems use two non-printing ...


1

Here is how you would do it in Perl: $ cat a.txt .artnau.com .bar.foo.example.org .chatserve.com .css.artnau.com .eagles.chatserve.com .example.com .foo.example.org $ cat a.txt | perl -ne 'BEGIN { my %h; } $h{$_} = ""; END { foreach (keys %h) { $orig = $_; $_ =~ s/^\..*?\./\./; print $orig if not exists $h{$_} } }' | sort > b.txt $ cat b.txt .artnau.com ...


1

U+1F60E is smiling face with sunglasses Unicode character which looks like this: Either your browser cannot display it, or it is incorrectly escaped on the actual web page you are having issues with.


1

The "best most universal" is subjective. It very much depends on what you are trying to achieve. Having said that, the most used character encoding on the web is UTF-8, according to W3techs.



Only top voted, non community-wiki answers of a minimum length are eligible