Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: fixing (some) special chars #7571

Merged
merged 5 commits into from
Sep 6, 2017

Conversation

smlng
Copy link
Member

@smlng smlng commented Sep 5, 2017

Specifically the following things were addressed:
- replacing special dashes with simple '-'
- fixing non-ascii whitespaces to plain ' '
- removing other not correctly displayed chars

Author names, greek symbols in units, and other commonly used
UTF8 chars were not adapted.

@smlng smlng added Area: doc Area: Documentation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 5, 2017
@smlng smlng requested review from miri64 and aabadie September 5, 2017 15:31
@smlng
Copy link
Member Author

smlng commented Sep 5, 2017

btw. used [^\x00-\x7F] regex to search, this is not optimal as it still finds German umlauts (like ä) and stuff. However, it does detect all other weird chars (like special dashes and whitespaces), too - so was fine for me.

I had some hard time lately debugging some code, that was copy-pasted and had weird (non-visible) chars in it, so checked RIOT as well ...

@miri64
Copy link
Member

miri64 commented Sep 5, 2017

Weird white-spaces I get (and to an extend the dash thing as well), but why do we need to remove the rest? The code is encoded in unicode, not ASCII.

@@ -17,7 +17,7 @@
*
* @file
*
* @author Jos� Ignacio Alamos <jialamos@uc.cl>
* @author José Ignacio Alamos <jialamos@uc.cl>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the é of José looks weird when viewed in Atom or VIM editors, obviously it doesn't on github.

@@ -66,7 +66,7 @@ index 2912049..682b7c2 100644
#include "ctimer.h"
-#include "random.h"
+#include "emb6_random.h"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing patch files this way can potentially end badly ;-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, you're right, that was unintentional. There are other patches with such, which I left out.

@kaspar030
Copy link
Contributor

Author names, greek symbols in units, and other commonly used
UTF8 chars were not adapted.

I don't get it. What gets replaced with what? I suppose you're replacing wierd ascii with the correct UTF-8?

@kaspar030 kaspar030 added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation and removed Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Sep 5, 2017
@smlng smlng changed the title doc: sensible replacing non-ascii chars cleanup: fixing (some) special chars Sep 6, 2017
@smlng
Copy link
Member Author

smlng commented Sep 6, 2017

I refactored the PR into smaller commits to clarify what is done where, also removed the fixes in that patch file. Btw. this how a part of the diff looks on my terminal (which looks different when viewed on GitHub):

     mrf24j40_reg_write_long(dev, MRF24J40_REG_RFCON0, channel_value);
     /*
-     * Note:Perform an RF State Machine Reset (see Section 3.1 <93>Reset<94>)
+     * Note: Perform an RF State Machine Reset (see Section 3.1 Reset)
      * after a channel frequency change. Then, delay at least 192 us after
      * the RF State Machine Reset, to allow the RF circuitry to calibrate.
      */
@@ -373,7 +373,7 @@ void mrf24j40_set_option(mrf24j40_t *dev, uint16_t option, bool state)
                 tmp |= MRF24J40_TXMCR_NOCSMA;
                 /* MACMINBE<1:0>: The minimum value of the backoff exponent
                  * in the CSMA-CA algorithm. Note that if this value is set
-                 * to <91>0<92>, collision avoidance is disabled. */
+                 * to 0, collision avoidance is disabled. */
                 mrf24j40_reg_write_short(dev, MRF24J40_REG_TXMCR, tmp);

@kaspar030
Copy link
Contributor

Did you do this via script or manually?

Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@kaspar030 kaspar030 merged commit 8b7450e into RIOT-OS:master Sep 6, 2017
@smlng smlng deleted the enh/doc/fix_non_ascii branch September 6, 2017 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants