« first day (2008 days earlier)      last day (1031 days later) » 

 
3 hours later…
3:48 AM
@Queen k (3 votes)
@Queen k Barmar (+ deleted)
@Queen k (closed as unclear)
@Queen k
@Queen k
@Queen k Community
@Queen f ...?
@Queen f (no duplicate nomination remains)
 
 
1 hour later…
5:29 AM
 
@oguzismail hmmm, could which "it" be what?
 
any of the two, the reason why it works for me and not you. I have no idea how encodings and clipboards work
 
how did you pass in the input?
echo $'\xe7\x8e\x8b\xe5\xa4\xa7\xe6\x98\x8e' | awk '{ print $0, length}'
王大明 9
 
With a here-document
王大明 3
 
does the above also work in your environment?
 
5:35 AM
yeah
 
I tried to look for something in the GNU Awk man page about Unicode or UTF-8 but quick grepping returned nothing
 
yeah it's a mystery, if you want me to test something just ping. gotta have breakfast
 
6:04 AM
do you have any other Unicode-related variables in your environment which might affect this?
 
6:45 AM
No, I don't think I have. foo=$'\xe7\x8e\x8b\xe5\xa4\xa7\xe6\x98\x8e'; echo ${#foo} prints 3 on all shells that support dollar-quote strings except NetBSD sh. And wc counts 3 characters on all four operating systems I tested on.
 
root@2f6c3d432a8b:/# foo=$'\xe7\x8e\x8b\xe5\xa4\xa7\xe6\x98\x8e'; echo ${#foo}
9
that's Ubuntu 20.04 in a freshly started Docker
but even after installing locales and configuring en_US.UTF-8 as the system default, I get 9
but then GNU Awk actually behaves like you describe
not wc though
 
7:40 AM
weird
 
user6153874
8:12 AM
anyone good with perl here
 
user6153874
2
Q: Check a file content is changed or not using Perl

HelpMeAndroidStudioI want to create a script that can detect any changes made to a file. This is my starting code, once detected a change, I will use curl to upload the new data into an online database. This example below is just an online solutions, other type of finding is welcome also. waht i require as structur...

 
user6153874
need help at this post T-T
 
aite imma check it out
 
 
1 hour later…
10:21 AM
@Queen k Community + deleted
 
10:44 AM
@HelpMeAndroidStudio please keep in mind that this is a Bash room
 
 
2 hours later…

« first day (2008 days earlier)      last day (1031 days later) »