(groovy) branch dependabot/gradle/org.jfrog.buildinfo-build-info-extractor-gradle-5.2.3 created (now 47a11a093c)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/gradle/org.jfrog.buildinfo-build-info-extractor-gradle-5.2.3 in repository https://gitbox.apache.org/repos/asf/groovy.git at 47a11a093c Bump org.jfrog.buildinfo:build-info-extractor-gradle from 5.2.2 to 5.2.3 No new revisions were added by this update.
(groovy-dev-site) branch asf-site updated: 2024/07/11 15:10:21: Generated dev website from groovy-website@7caf909
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git The following commit(s) were added to refs/heads/asf-site by this push: new abb55fe 2024/07/11 15:10:21: Generated dev website from groovy-website@7caf909 abb55fe is described below commit abb55fe49c401b96f5aae7183907fbc81f230a6c Author: jenkins AuthorDate: Thu Jul 11 15:10:21 2024 + 2024/07/11 15:10:21: Generated dev website from groovy-website@7caf909 --- blog/adventures-with-groovyfx.html | 2 +- blog/apache-groovy-2022-year-in.html | 2 +- blog/classifying-iris-flowers-with-deep.html | 2 +- blog/comparators-and-sorting-in-groovy.html| 2 +- blog/deck-of-cards-with-groovy.html| 2 +- blog/deep-learning-and-eclipse-collections.html| 2 +- blog/detecting-objects-with-groovy-the.html| 2 +- blog/feed.atom | 22 --- blog/fruity-eclipse-collections.html | 2 +- blog/fun-with-obfuscated-groovy.html | 2 +- blog/gmavenplus-1-6-2-released.html| 2 +- blog/gpars-meets-virtual-threads.html | 2 +- blog/groovy-2-4-16-released.html | 2 +- blog/groovy-2-4-16-windows.html| 2 +- blog/groovy-2-4-17-released.html | 2 +- blog/groovy-2-5-0-released.html| 2 +- blog/groovy-2-5-1-released.html| 2 +- blog/groovy-2-5-2-released.html| 2 +- blog/groovy-2-5-2-windows.html | 2 +- blog/groovy-2-5-3-released.html| 2 +- blog/groovy-2-5-3-windows.html | 2 +- blog/groovy-2-5-4-released.html| 2 +- blog/groovy-2-5-4-windows.html | 2 +- blog/groovy-2-5-5-released.html| 2 +- blog/groovy-2-5-5-windows.html | 2 +- blog/groovy-2-5-6-released.html| 2 +- blog/groovy-2-5-7-and.html | 2 +- blog/groovy-2-5-7-released.html| 2 +- blog/groovy-2-5-clibuilder-renewal.html| 2 +- blog/groovy-3-0-0-alpha.html | 2 +- blog/groovy-3-0-0-alpha1.html | 2 +- blog/groovy-3-0-0-beta.html| 2 +- blog/groovy-3-0-0-beta1.html | 2 +- blog/groovy-3-0-0-beta2.html | 2 +- blog/groovy-4-0-3-released.html| 2 +- blog/groovy-dauphine.html | 2 +- blog/groovy-haiku-processing.html | 2 +- blog/groovy-list-processing-cheat-sheet.html | 2 +- blog/groovy-null-processing.html | 2 +- blog/groovy-record-performance.html| 2 +- blog/groovy-records.html | 2 +- blog/groovy-release-train-4-0.html | 2 +- blog/groovy-sequenced-collections.html | 2 +- ...ml => handling-byte-order-mark-characters.html} | 43 ++ blog/helloworldemoji.html | 2 +- blog/index.html| 4 +- blog/lego-bricks-with-groovy.html | 2 +- blog/matrix-calculations-with-groovy-apache.html | 2 +- blog/parsing-json-with-groovy.html | 2 +- blog/reading-and-writing-csv-files.html| 2 +- blog/seasons-greetings-emoji.html | 2 +- blog/set-operations-with-groovy.html | 2 +- blog/using-groovy-with-apache-wayang.html | 2 +- blog/whiskey-clustering-with-groovy-and.html | 2 +- blog/wordle-checker.html | 2 +- blog/working-with-sql-databases-with.html | 2 +- blog/zipping-collections-with-groovy.html | 2 +- 57 files changed, 107 insertions(+), 70 deletions(-) diff --git a/blog/adventures-with-groovyfx.html b/blog/adventures-with-groovyfx.html index a599efe..f302b18 100644 --- a/blog/adventures-with-groovyfx.html +++ b/blog/adventures-with-groovyfx.html @@ -53,7 +53,7 @@ -Blog indexAdventures with GroovyFXFurther informationRelated postsBlog indexAdventures with GroovyFXFurther informationRelated posts This blog looks at a http://groovyfx.org/";>GroovyFX version of a https://donraab.medium.com/my-weird-and-wonderful-first-adventures-with-javafx-6efe3b1923c8";>ToDo application originally written in JavaFX. diff --git a/blog/apache-groovy-2022-year-in.html b/blog/apache-groovy-2022-year-in.html index 7b7e480..6f143ed 100644 --- a/blog/apache-groovy-2022-year-in.html +++ b/blog/apache-groovy-2022-year-in.html @@ -53,7 +53,7 @@
(groovy-website) branch asf-site updated: add BOM characters blog post
This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/groovy-website.git The following commit(s) were added to refs/heads/asf-site by this push: new 7caf909 add BOM characters blog post 7caf909 is described below commit 7caf9095f3d9d68353eb95d960b0a9b7ec34c983 Author: Paul King AuthorDate: Fri Jul 12 00:50:04 2024 +1000 add BOM characters blog post --- .../blog/handling-byte-order-mark-characters.adoc | 39 ++ 1 file changed, 39 insertions(+) diff --git a/site/src/site/blog/handling-byte-order-mark-characters.adoc b/site/src/site/blog/handling-byte-order-mark-characters.adoc new file mode 100644 index 000..35c268c --- /dev/null +++ b/site/src/site/blog/handling-byte-order-mark-characters.adoc @@ -0,0 +1,39 @@ += Handling Byte-Order-Mark Characters in Groovy +Paul King +:revdate: 2024-07-11T20:00:00+00:00 +:keywords: groovy, bom_chars, unicode, encoding +:description: Handling Byte Order Mark (BOM) characters in Groovy + +A https://www.javacodegeeks.com/remove-byte-order-mark-characters-from-file.html[recent article] +showed how to process https://en.wikipedia.org/wiki/Byte_order_mark[Byte Order Mark (BOM)] characters +within text files when coding in Java. In particular, often manual removal of those characters might +be needed when processing text files. The article showed how to remove the BOM characters when using +the `InputStream` and `Reader` classes as well as how to do it using `NIO` functionality. It also showed +how the `BOMInputStream` class in https://commons.apache.org/proper/commons-io/[Apache Commons IO] +could be used. It automatically skips over the BOM characters. + +Those examples can be run as is in Groovy (albeit after fixing a bug in the first example) +but the (complete!) idiomatic solution in Groovy is: + +[source,groovy] + +println new File('file.txt').text + + +That's right, Groovy automatically detects +the encoding, and removes BOM characters, +when using the `getText()` method +along with others like `eachLine`, `splitEachLine`, +`readLines`, `withReader`, and `filterLine`. +The same functionality can be obtained using +the `newReader` method too on files and URLs. + +When needed there are variants that let you +specify the encoding should you wish to explicitly +declare it. In that case, you'd need to handle the +BOM characters manually. + +Groovy's methods like `getText` call an underlying +`CharsetToolkit` class. You can also use that class directly +should you wish to learn more about the encoding +of a file. \ No newline at end of file