Giter Club home page Giter Club logo

Comments (5)

kenden avatar kenden commented on June 23, 2024

@qjd2413 Thanks for reporting the issue!

"It works on my machine" (TM)(C) with the same versions...

Could you send the results of those commands?

$ uname -a
$ which bash

Also, could you add set -o xtrace (debug mode) after the first line in
exercises/bob/bob.sh, run:

$ cd exercises/bob && bash bob.sh "\n\r \t\u000b\u00a0\u2002"

And send the result?

from bash.

qjd2413 avatar qjd2413 commented on June 23, 2024
$> uname -a
Linux machine-name 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
$> which bash
/bin/bash
$> bash bob.sh "\n\r \t\u000b\u00a0\u2002"
++ printf %b '\n\r \t\u000b\u00a0\u2002'
+ input='

          '
+ input= 
+ [[   == '' ]]
+ [[   == *[[:upper:]]* ]]
+ [[   == \? ]]
+ echo Whatever.
Whatever.

from bash.

kenden avatar kenden commented on June 23, 2024

Strange, "\u00a0" is matched by [[:space:]] on mac but not Linux. I could repro and fix on Ubuntu.

from bash.

platinumthinker avatar platinumthinker commented on June 23, 2024

Usage this for utf support:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

from bash.

kenden avatar kenden commented on June 23, 2024

Fixed

from bash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.